SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUFontRef Struct Reference

A font entity reference. More...

#include <SketchUpAPI/model/font.h>

Inherits SUEntityRef.

Related Functions

(Note that these are not member functions.)

enum SUResult SUFontGetFaceName (SUFontRef font, SUStringRef *name)
 Retrieves the face name of a font object. More...
 
enum SUResult SUFontGetPointSize (SUFontRef font, size_t *size)
 Retrieves a font's point size. More...
 
enum SUResult SUFontGetBold (SUFontRef font, bool *is_bold)
 Retrieves a boolean indicating whether the font is bold. More...
 
enum SUResult SUFontGetItalic (SUFontRef font, bool *is_italic)
 Retrieves a boolean indicating whether the font is italic. More...
 
enum SUResult SUFontGetUseWorldSize (SUFontRef font, bool *use_world_size)
 Retrieves a boolean indicating whether the size of the font is defined as a height in world space. A false value indicates that the font size is defined in points (i.e. in screen space). More...
 
enum SUResult SUFontGetWorldSize (SUFontRef font, double *world_size)
 Retrieves the height of the font in inches when the font size is defined as a height in world space. That is, when SUFontGetUseWorldSize() returns true. More...
 
SUEntityRef SUFontToEntity (SUFontRef font)
 Converts from an SUFontRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SUFontRef SUFontFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUFontRef. This is essentially a downcast operation so the given entity must be convertible to an SUFontRef. More...
 

Detailed Description

A font entity reference.

Since
SketchUp 2017, API 5.0

Friends And Related Function Documentation

SUFontRef SUFontFromEntity ( SUEntityRef  entity)
related

Converts from an SUEntityRef to an SUFontRef. This is essentially a downcast operation so the given entity must be convertible to an SUFontRef.

Since
SketchUp 2019, API 7.0
Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUFontRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SUFontGetBold ( SUFontRef  font,
bool *  is_bold 
)
related

Retrieves a boolean indicating whether the font is bold.

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]is_boldThe boolean retrieved.
Returns
enum SUResult SUFontGetFaceName ( SUFontRef  font,
SUStringRef name 
)
related

Retrieves the face name of a font object.

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]nameThe name retrieved.
Returns
enum SUResult SUFontGetItalic ( SUFontRef  font,
bool *  is_italic 
)
related

Retrieves a boolean indicating whether the font is italic.

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]is_italicThe boolean retrieved.
Returns
enum SUResult SUFontGetPointSize ( SUFontRef  font,
size_t *  size 
)
related

Retrieves a font's point size.

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]sizeThe returned font size.
Returns
enum SUResult SUFontGetUseWorldSize ( SUFontRef  font,
bool *  use_world_size 
)
related

Retrieves a boolean indicating whether the size of the font is defined as a height in world space. A false value indicates that the font size is defined in points (i.e. in screen space).

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]use_world_sizeThe boolean retrieved.
Returns
enum SUResult SUFontGetWorldSize ( SUFontRef  font,
double *  world_size 
)
related

Retrieves the height of the font in inches when the font size is defined as a height in world space. That is, when SUFontGetUseWorldSize() returns true.

Since
SketchUp 2017, API 5.0
Parameters
[in]fontThe font object.
[out]world_sizeThe returned world size factor.
Returns
SUEntityRef SUFontToEntity ( SUFontRef  font)
related

Converts from an SUFontRef to an SUEntityRef. This is essentially an upcast operation.

Since
SketchUp 2019, API 7.0
Parameters
[in]fontThe given font reference.
Returns
  • The converted SUEntityRef if font is a valid font.
  • If not, the returned reference will be invalid.

The documentation for this struct was generated from the following files: