Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Font size in GeClipMap

 Post Reply Post Reply
Author
Message
C4DS View Drop Down
Member
Member


Joined: 2015 Dec 01
Online Status: Offline
Posts: 125
Post Options Post Options   Quote C4DS Quote  Post ReplyReply Direct Link To This Post Topic: Font size in GeClipMap
    Posted: 2017 Nov 05 at 11:57pm

User Information:

Cinema 4D Version:    
Platform:      
Language(s):       

---------

I have been able to display some text in the viewport according to answers provided in this thread:
http://www.plugincafe.com/forum/forum_posts.asp?TID=3712

However, I haven't been able to change the font size. Searching through the forum did provide  a single solution:
http://www.plugincafe.com/forum/forum_posts.asp?TID=10428&KW=setfont&PID=40428#40428

But I cannot get it to work, as calling SetFont or SetFontSize always fail.

trial 1

Float gFontScale = 3;
BaseContainer fontDescription;
clipMap->GetDefaultFont(GE_FONT_DEFAULT_SYSTEM, &fontDescription);
Float fontSize;
clipMap->GetFontSize(&fontDescription, GE_FONT_SIZE_INTERNAL, &fontSize);
Bool ret = clipMap->SetFont(&fontDescription, fontSize * gFontScale);


trial 2

BaseContainer fontbc;
if (!GeClipMap::GetDefaultFont(GE_FONT_DEFAULT_SYSTEM, &fontbc)) return FALSE;

Bool ret = clipMap->SetFontSize(&fontbc, GE_FONT_SIZE_INTERNAL, 50.0);




Edited by C4DS - 2017 Nov 05 at 11:58pm
Back to Top
S_Bach View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2011 Jun 27
Online Status: Offline
Posts: 1330
Post Options Post Options   Quote S_Bach Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 06 at 2:21am
Hello,

both GetDefaultFont and SetFontSize are static functions. You find some example code on how to use such functions in the GeClipMap Manual.

best wishes,
Sebastian
SDK Support Engineer
Back to Top
C4DS View Drop Down
Member
Member


Joined: 2015 Dec 01
Online Status: Offline
Posts: 125
Post Options Post Options   Quote C4DS Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 06 at 2:55am
Thanks Sebastian,

I still couldn't get the SetFontSize to work.
But from the GeClipMap manual example I managed to get the (non-static) SetFont to work.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.