Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Font size in GeClipMap

    SDK Help
    0
    3
    479
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 05/11/2017 at 23:57, xxxxxxxx wrote:

      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:
      https://developers.maxon.net/forum/topic/4169/3712_draw-text-to-viewport-like-measureconst

      However, I haven't been able to change the font size. Searching through the forum did provide  a single solution:
      https://developers.maxon.net/forum/topic/8025/10428_size-of-the-character-of-geclipmap&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);  
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 06/11/2017 at 02:21, xxxxxxxx wrote:

        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

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 06/11/2017 at 02:55, xxxxxxxx wrote:

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post