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...
 
#define SU_FONT_INFO_VERSION
 Current version of the SUFontInfo struct.
 
enum SUResult SUModelAddFont (SUModelRef model_ref, const struct SUFontInfo *font_info, SUFontRef *added_font_ref)
 Returns an object reference to a font object based on font_info. 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.
enum SUResult SUModelAddFont ( SUModelRef  model_ref,
const struct SUFontInfo font_info,
SUFontRef added_font_ref 
)
related

Returns an object reference to a font object based on font_info.

Note
The returned font reference may be for either an existing object in the model or a new in-model object if none existed previously. It may also become invalid if assigned to an object which later has a different font assigned to it.
Since
SketchUp 2026.0, API 14.0
Parameters
[in]model_refThe model font is to be associated with.
[in]font_infoStruct that defines all parameters of the new font.
[out]added_font_refThe font object returned.
Returns

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