Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/02/2011 at 07:31, xxxxxxxx wrote:
User Information: Cinema 4D Version: 11.5 Platform: Language(s) : C.O.F.F.E.E ;
--------- Hello,
how can I read the font type from the text object? I saw something like FontData, but I don't know how it works with the FONT
CONTAINER BPsplinetext { ... FONT ID_PAINTSPLINETEXT_FONT { } ... }
together.
regards Marky
On 03/02/2011 at 08:10, xxxxxxxx wrote:
The FontData data type, as most custom data types, is not accessible through COFFEE.
cheers, Matthias
On 03/02/2011 at 23:23, xxxxxxxx wrote:
oh sorry, I mine in C++ not in COFFEE.
On 04/02/2011 at 00:41, xxxxxxxx wrote:
mmh, something is strance with this type. If I trying to allocate an object with
AutoAlloc<FontData> fd;
I get always an compiler error
c:\program files\maxon\cinema 4d r11.5\resource\_api\c4d_customdatatype.h(43) : error C2248: 'FontData::FontData' : cannot access private member declared in class 'FontData' 1> c:\program files\maxon\cinema 4d r11.5\resource\_api\c4d_customgui\customgui_fontchooser.h(37) : see declaration of 'FontData::FontData' 1> c:\program files\maxon\cinema 4d r11.5\resource\_api\c4d_customgui\customgui_fontchooser.h(34) : see declaration of 'FontData'
What's wrong ?
On 04/02/2011 at 01:52, xxxxxxxx wrote:
It's an error in the docs. The FontData class has no Alloc and Free methods.
To read existing FontData you don't need to allocate it anyway.
Example:
FontData *fontdata = (FontData* )data->GetCustomDataType(MY_FONT, FONTCHOOSER_DATA); ... BaseContainer fc = fontdata->GetFont(); Filename font = fc.GetFilename(FONT_POSTSCRIPT_NAME);
On 04/02/2011 at 02:22, xxxxxxxx wrote:
Hello Matthias, ic, the compiler and linker errors are off. But I don't get the filename of the font. I get only an empty filename ??
FontData *fdata = (FontData* )op->GetDataInstance()->GetCustomDataType( TXT_ID_PAINTSPLINETEXT_FONT, FONTCHOOSER_DATA); if (fdata) { BaseContainer fc = fdata->GetFont(); Filename font = fc.GetFilename(FONT_POSTSCRIPT_NAME); GePrint("Font: "+ font.GetString()); }
On 04/02/2011 at 02:36, xxxxxxxx wrote:
I guess it only works with postscript fonts, not True Type.
I don't know if it is even possible to retrieve the True Type font. I have to ask the developers.
On 04/02/2011 at 02:39, xxxxxxxx wrote:
ok, thanks.
Marky
On 04/02/2011 at 04:07, xxxxxxxx wrote:
Hello Matthias,
maybe you can give me an hint about the font topic. My problem is, that I generate an own ObjectData plugin and generate three objects in the GetVirtualObj. function. An null, an Osplinetext and an Oextrude object, because I need the same behaviour like if I would generate this objects by hand. But I can't taken over all properties in the description files, therefore I create my own with some similar properties. And now I must forward all settings into the right basic objects, also the font. Do you have an idea or an proposal, how I can do this (reading the font and put it into the Osplinetext object, that was my idea). But this doesn't works. Maybe the developers has an idea?
regards Markus