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

    Size of the character of GeClipMap

    SDK Help
    0
    3
    495
    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 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.

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

        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

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

          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!

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