TrueTypeFontImporter

Struct TrueTypeFontImporter 

Source
pub struct TrueTypeFontImporter {
Show 27 fields pub m_FontNames: Vec<String>, pub m_FontSize: i32, pub m_ForceTextureCase: i32, pub m_IncludeFontData: bool, pub m_Name: String, pub m_AscentCalculationMode: Option<i32>, pub m_AssetBundleName: Option<String>, pub m_AssetBundleVariant: Option<String>, pub m_CharacterPadding: Option<i32>, pub m_CharacterSpacing: Option<i32>, pub m_CustomCharacters: Option<String>, pub m_ExternalObjects: Option<Vec<(SourceAssetIdentifier, PPtr)>>, pub m_FallbackFontReferences: Option<Vec<PPtr>>, pub m_FileIDToRecycleName: Option<Vec<(i32, String)>>, pub m_FontColor: Option<ColorRGBA>, pub m_FontName: Option<String>, pub m_FontRenderingMode: Option<i32>, pub m_NewHashIdentity: Option<MdFour>, pub m_OldHashIdentity: Option<MdFour>, pub m_Output: Option<Output>, pub m_RenderMode: Option<i32>, pub m_ShouldRoundAdvanceValue: Option<bool>, pub m_Style: Option<i32>, pub m_Use2xBehaviour: Option<bool>, pub m_UseLegacyBoundsCalculation: Option<bool>, pub m_UsedFileIDs: Option<Vec<i64>>, pub m_UserData: Option<String>,
}
Expand description

TrueTypeFontImporter is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: AssetImporter for importing Fonts.

Fields§

§m_FontNames: Vec<String>

An array of font names, to be used when includeFontData is set to false.

§m_FontSize: i32

Font size to use for importing the characters.

§m_ForceTextureCase: i32§m_IncludeFontData: bool

If this is enabled, the actual font will be embedded into the asset for Dynamic fonts.

§m_Name: String

The name of the object.

§m_AscentCalculationMode: Option<i32>

Calculation mode for determining font’s ascent. i32: (5.3.4f1 - 2022.3.2f1)

§m_AssetBundleName: Option<String>

Get or set the AssetBundle name. String: (5.0.0f4 - 2022.3.2f1)

§m_AssetBundleVariant: Option<String>

Get or set the AssetBundle variant. String: (5.0.0f4 - 2022.3.2f1)

§m_CharacterPadding: Option<i32>

Border pixels added to character images for padding. This is useful if you want to render text using a shader which needs to render outside of the character area (like an outline shader). i32: (4.0.0 - 2022.3.2f1)

§m_CharacterSpacing: Option<i32>

Spacing between character images in the generated texture in pixels. This is useful if you want to render text using a shader which samples pixels outside of the character area (like an outline shader). i32: (4.0.0 - 2022.3.2f1)

§m_CustomCharacters: Option<String>

A custom set of characters to be included in the Font Texture. String: (3.5.0 - 2022.3.2f1)

§m_ExternalObjects: Option<Vec<(SourceAssetIdentifier, PPtr)>>

Vec<(SourceAssetIdentifier, PPtr<[Object]>)>: (2017.2.0b2 - 2022.3.2f1)

§m_FallbackFontReferences: Option<Vec<PPtr>>

Vec<PPtr<Font>>: (5.2.0f2 - 2022.3.2f1)

§m_FileIDToRecycleName: Option<Vec<(i32, String)>>

Vec<(i32, String)>: (3.4.0 - 3.4.2)

§m_FontColor: Option<ColorRGBA>

ColorRGBA: (3.5.0 - 4.1.5)

§m_FontName: Option<String>

String: (5.5.0f3 - 2022.3.2f1)

§m_FontRenderingMode: Option<i32>

Font rendering mode to use for this font. i32: (4.0.0 - 2022.3.2f1)

§m_NewHashIdentity: Option<MdFour>

MdFour: (3.4.0 - 3.4.2)

§m_OldHashIdentity: Option<MdFour>

MdFour: (3.4.0 - 3.4.2)

§m_Output: Option<Output>

Output: (4.0.0 - 2022.3.2f1)

§m_RenderMode: Option<i32>

i32: (3.4.0 - 3.5.7)

§m_ShouldRoundAdvanceValue: Option<bool>

Set this property to true if you want to round the internal advance width of the font to the nearest integer. bool: (2018.1.0b2 - 2022.3.2f1)

§m_Style: Option<i32>

i32: (3.4.0 - 3.5.7)

§m_Use2xBehaviour: Option<bool>

bool: (3.4.0 - 5.3.3f1)

§m_UseLegacyBoundsCalculation: Option<bool>

bool: (5.6.5f1 - 2022.3.2f1)

§m_UsedFileIDs: Option<Vec<i64>>

Vec: (2019.1.0b1 - 2022.3.2f1)

§m_UserData: Option<String>

Get or set any user data. String: (4.0.0 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for TrueTypeFontImporter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TrueTypeFontImporter

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TrueTypeFontImporter

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,