Text
Types
uint32_t |
Fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Functions
void |
|
void |
|
void |
|
void |
|
Detailed Description
-
namespace Text
Type Documentation
-
enum SC::Store::Utils::Text::Quality
Configures generic quality.
Values:
-
enumerator Low
-
enumerator Medium
-
enumerator High
-
enumerator Low
-
enum class SC::Store::Utils::Text::TextAlignment : uint32_t
Values:
-
enumerator TopLeft
Insertion point is the top left corner of the text string.
-
enumerator CenterLeft
Insertion point is the center of the left side of the text string.
-
enumerator BottomLeft
Insertion point is the bottom left corner of the text string.
-
enumerator TopCenter
Insertion point is the center of the top side of the text string.
-
enumerator Center
Insertion point is the vertical and horizontal center of the text string.
-
enumerator BottomCenter
Insertion point is the center of the bottom side of the text string.
-
enumerator TopRight
Insertion point is the top right corner of the text string.
-
enumerator CenterRight
Insertion point is the center of the right side of the text string.
-
enumerator BottomRight
Insertion point is the bottom right corner of the text string.
-
enumerator TopLeft
Function Documentation
-
void SC::Store::Utils::Text::Shutdown()
This function should be called after use of this library is finished. After this function is called, functions in this library should not be called.
-
void SC::Store::Utils::Text::SetFontDirectory(char const *font_directory)
Sets the font directory to search for fonts in.
- Parameters
font_directory – The file path of the search directory to set.
-
void SC::Store::Utils::Text::SetFallbackFonts(std::vector<char const*> const &fallback_font_names)
Supplies a list of fonts to be used as fallbacks for when a character can not be found in an active font.
- Parameters
fallback_font_names – A list of UTF8 encoded strings that correspond to the fallback fonts being used.
-
void SC::Store::Utils::Text::ReleaseFontResources()
Closes any open font resources used by this library. Useful for deleting any temporary font files. This is implicitly called by Shutdown().
-
MeshKey SC::Store::Utils::Text::InsertText(Model &model, TextAlignment alignment, Matrix3d const &transform, char const *utf8_text, char const *font_name, FontStyle::Bits font_style, Quality font_quality, TextRepresentation::Bits representation_bits)
Inserts text into the stream cache as mesh geometry.
- Parameters
model – The stream cache model to insert the text into.
alignment – Controls the alignment of the inserted text relative to its inserted position.
transform – Transforms the generated mesh points by this matrix.
utf8_text – The text to insert. Text is expected to be in UTF-8 encoding.
font_name – The name of the font to generate the text with.
font_style – The style of the font to generate the text with.
font_quality – The quality of the font to generate the text with.
representation_bits – Controls whether or not the text is inserted as faces and/or lines.
- Returns
The mesh key of the generated text geometry.