How to get FontData from Osplinetext
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/02/2004 at 06:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;---------
hi there,
i tried to read the selected font from a splinetext object but i don't know how to do it?I tried several things but that one i prefer mostly:
BaseObject *bo = doc->GetFirstObject(); if (bo->GetType() == Osplinetext) { BaseContainer *bc = bo->GetDataInstance(); String font = bc->GetString(PRIM_TEXT_FONT); ... }
Could anybody give me a tip?
Ingo
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/02/2004 at 18:58, xxxxxxxx wrote:
PRIM_TEXT_FONT is not a STRING, it's a FONT. (See Osplinetext.res.) That's why you cannot read it with GetString().
To read the font you have to use GetCustomDataType() with FONTCHOOSER_DATA as type. Cast the returned value to a FontData pointer. (Note that there's not much you can do with a FontData except using it to set the font of another spline, or set the postscript font.) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/02/2004 at 06:05, xxxxxxxx wrote:
thanks Mikael,
i don't want to do much with the font. your tip will help me a lot.