Size of the character of GeClipMap
-
On 10/07/2014 at 09:38, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Hi.I have to display the string in the view port in GeClipMap.
But, it is hard to see because the size of the character is small.
Please tell me how to increase the size of the character. -
On 10/07/2014 at 10:20, xxxxxxxx wrote:
Unfortunately there is no documentation available on the structure for a font container.
But dumping what I get from c4d.gui.FontDialog(), I made this function:def get_font(name, size, thickness, is_italic=False) : bc = c4d.BaseContainer() bc.SetString(500, name) bc.SetLong(501, -size - 3) bc.SetLong(502, thickness) bc.SetLong(503, 255 if is_italic else 0) bc.SetLong(504, 0) return bc def main() : font = get_font('Segoe UI', 9, 700) #c4d.gui.FontDialog() for k, v in font: print k, v print "---" main()
You can translate it to C++.
-Niklas
-
On 11/07/2014 at 07:09, xxxxxxxx wrote:
I was able to change the size of text.
BaseContainer bc; if (!cm->GetDefaultFont(GE_FONT_DEFAULT_SYSTEM, &bc;)) return false; Float size; if(cm->GetFontSize(&bc;,GE_FONT_SIZE_INTERNAL, &size;) ) { size *= scale; if(!cm->SetFont( &bc;, size)) return false; }
Thanks!