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

    How to get FontData from Osplinetext

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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 19/02/2004 at 06:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      hi there,
      i tried to read the selected font from a splinetext object but i don't know how to do it?

      I tried several things but that one i prefer mostly:

        
      BaseObject *bo = doc->GetFirstObject();  
        
      if (bo->GetType() == Osplinetext)  
      {  
         BaseContainer *bc = bo->GetDataInstance();  
         String font = bc->GetString(PRIM_TEXT_FONT);  
         ...  
      }  
      

      Could anybody give me a tip?

      Ingo

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 19/02/2004 at 18:58, xxxxxxxx wrote:

        PRIM_TEXT_FONT is not a STRING, it's a FONT. (See Osplinetext.res.) That's why you cannot read it with GetString().
        To read the font you have to use GetCustomDataType() with FONTCHOOSER_DATA as type. Cast the returned value to a FontData pointer. (Note that there's not much you can do with a FontData except using it to set the font of another spline, or set the postscript font.)

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 20/02/2004 at 06:05, xxxxxxxx wrote:

          thanks Mikael,
          i don't want to do much with the font. your tip will help me a lot.

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