Struct norad::fontinfo::FontInfo [−][src]
pub struct FontInfo {Show 108 fields
pub ascender: Option<IntegerOrFloat>,
pub cap_height: Option<IntegerOrFloat>,
pub copyright: Option<String>,
pub descender: Option<IntegerOrFloat>,
pub family_name: Option<String>,
pub guidelines: Option<Vec<Guideline>>,
pub italic_angle: Option<IntegerOrFloat>,
pub macintosh_fond_family_id: Option<i32>,
pub macintosh_fond_name: Option<String>,
pub note: Option<String>,
pub open_type_gasp_range_records: Option<Vec<GaspRangeRecord>>,
pub open_type_head_created: Option<String>,
pub open_type_head_flags: Option<Vec<u8>>,
pub open_type_head_lowest_rec_ppem: Option<u32>,
pub open_type_hhea_ascender: Option<i32>,
pub open_type_hhea_caret_offset: Option<i32>,
pub open_type_hhea_caret_slope_rise: Option<i32>,
pub open_type_hhea_caret_slope_run: Option<i32>,
pub open_type_hhea_descender: Option<i32>,
pub open_type_hhea_line_gap: Option<i32>,
pub open_type_name_compatible_full_name: Option<String>,
pub open_type_name_description: Option<String>,
pub open_type_name_designer_url: Option<String>,
pub open_type_name_designer: Option<String>,
pub open_type_name_license: Option<String>,
pub open_type_name_license_url: Option<String>,
pub open_type_name_manufacturer: Option<String>,
pub open_type_name_manufacturer_url: Option<String>,
pub open_type_name_preferred_family_name: Option<String>,
pub open_type_name_preferred_subfamily_name: Option<String>,
pub open_type_name_records: Option<Vec<NameRecord>>,
pub open_type_name_sample_text: Option<String>,
pub open_type_name_unique_id: Option<String>,
pub open_type_name_version: Option<String>,
pub open_type_name_wws_family_name: Option<String>,
pub open_type_name_wws_subfamily_name: Option<String>,
pub open_type_os2_code_page_ranges: Option<Vec<u8>>,
pub open_type_os2_family_class: Option<Os2FamilyClass>,
pub open_type_os2_panose: Option<Os2Panose>,
pub open_type_os2_selection: Option<Vec<u8>>,
pub open_type_os2_strikeout_position: Option<i32>,
pub open_type_os2_strikeout_size: Option<i32>,
pub open_type_os2_subscript_x_offset: Option<i32>,
pub open_type_os2_subscript_x_size: Option<i32>,
pub open_type_os2_subscript_y_offset: Option<i32>,
pub open_type_os2_subscript_y_size: Option<i32>,
pub open_type_os2_superscript_x_offset: Option<i32>,
pub open_type_os2_superscript_x_size: Option<i32>,
pub open_type_os2_superscript_y_offset: Option<i32>,
pub open_type_os2_superscript_y_size: Option<i32>,
pub open_type_os2_type: Option<Vec<u8>>,
pub open_type_os2_typo_ascender: Option<i32>,
pub open_type_os2_typo_descender: Option<i32>,
pub open_type_os2_typo_line_gap: Option<i32>,
pub open_type_os2_unicode_ranges: Option<Vec<u8>>,
pub open_type_os2_vendor_id: Option<String>,
pub open_type_os2_weight_class: Option<u32>,
pub open_type_os2_width_class: Option<Os2WidthClass>,
pub open_type_os2_win_ascent: Option<u32>,
pub open_type_os2_win_descent: Option<u32>,
pub open_type_vhea_caret_offset: Option<i32>,
pub open_type_vhea_caret_slope_rise: Option<i32>,
pub open_type_vhea_caret_slope_run: Option<i32>,
pub open_type_vhea_vert_typo_ascender: Option<i32>,
pub open_type_vhea_vert_typo_descender: Option<i32>,
pub open_type_vhea_vert_typo_line_gap: Option<i32>,
pub postscript_blue_fuzz: Option<IntegerOrFloat>,
pub postscript_blue_scale: Option<f64>,
pub postscript_blue_shift: Option<IntegerOrFloat>,
pub postscript_blue_values: Option<Vec<IntegerOrFloat>>,
pub postscript_default_character: Option<String>,
pub postscript_default_width_x: Option<IntegerOrFloat>,
pub postscript_family_blues: Option<Vec<IntegerOrFloat>>,
pub postscript_family_other_blues: Option<Vec<IntegerOrFloat>>,
pub postscript_font_name: Option<String>,
pub postscript_force_bold: Option<bool>,
pub postscript_full_name: Option<String>,
pub postscript_is_fixed_pitch: Option<bool>,
pub postscript_nominal_width_x: Option<IntegerOrFloat>,
pub postscript_other_blues: Option<Vec<IntegerOrFloat>>,
pub postscript_slant_angle: Option<IntegerOrFloat>,
pub postscript_stem_snap_h: Option<Vec<IntegerOrFloat>>,
pub postscript_stem_snap_v: Option<Vec<IntegerOrFloat>>,
pub postscript_underline_position: Option<IntegerOrFloat>,
pub postscript_underline_thickness: Option<IntegerOrFloat>,
pub postscript_unique_id: Option<i32>,
pub postscript_weight_name: Option<String>,
pub postscript_windows_character_set: Option<PostscriptWindowsCharacterSet>,
pub style_map_family_name: Option<String>,
pub style_map_style_name: Option<StyleMapStyle>,
pub style_name: Option<String>,
pub trademark: Option<String>,
pub units_per_em: Option<NonNegativeIntegerOrFloat>,
pub version_major: Option<i32>,
pub version_minor: Option<u32>,
pub woff_major_version: Option<u32>,
pub woff_metadata_copyright: Option<WoffMetadataCopyright>,
pub woff_metadata_credits: Option<WoffMetadataCredits>,
pub woff_metadata_description: Option<WoffMetadataDescription>,
pub woff_metadata_extensions: Option<Vec<WoffMetadataExtensionRecord>>,
pub woff_metadata_license: Option<WoffMetadataLicense>,
pub woff_metadata_licensee: Option<WoffMetadataLicensee>,
pub woff_metadata_trademark: Option<WoffMetadataTrademark>,
pub woff_metadata_unique_id: Option<WoffMetadataUniqueId>,
pub woff_metadata_vendor: Option<WoffMetadataVendor>,
pub woff_minor_version: Option<u32>,
pub x_height: Option<IntegerOrFloat>,
pub year: Option<i32>,
}
Expand description
The contents of the fontinfo.plist
file. This structure is hard-wired to the
available attributes in UFO version 3.
Fields
ascender: Option<IntegerOrFloat>
cap_height: Option<IntegerOrFloat>
copyright: Option<String>
descender: Option<IntegerOrFloat>
family_name: Option<String>
guidelines: Option<Vec<Guideline>>
italic_angle: Option<IntegerOrFloat>
macintosh_fond_family_id: Option<i32>
macintosh_fond_name: Option<String>
note: Option<String>
open_type_gasp_range_records: Option<Vec<GaspRangeRecord>>
open_type_head_created: Option<String>
open_type_head_flags: Option<Vec<u8>>
open_type_head_lowest_rec_ppem: Option<u32>
open_type_hhea_ascender: Option<i32>
open_type_hhea_caret_offset: Option<i32>
open_type_hhea_caret_slope_rise: Option<i32>
open_type_hhea_caret_slope_run: Option<i32>
open_type_hhea_descender: Option<i32>
open_type_hhea_line_gap: Option<i32>
open_type_name_compatible_full_name: Option<String>
open_type_name_description: Option<String>
open_type_name_designer_url: Option<String>
open_type_name_designer: Option<String>
open_type_name_license: Option<String>
open_type_name_license_url: Option<String>
open_type_name_manufacturer: Option<String>
open_type_name_manufacturer_url: Option<String>
open_type_name_preferred_family_name: Option<String>
open_type_name_preferred_subfamily_name: Option<String>
open_type_name_records: Option<Vec<NameRecord>>
open_type_name_sample_text: Option<String>
open_type_name_unique_id: Option<String>
open_type_name_version: Option<String>
open_type_name_wws_family_name: Option<String>
open_type_name_wws_subfamily_name: Option<String>
open_type_os2_code_page_ranges: Option<Vec<u8>>
open_type_os2_family_class: Option<Os2FamilyClass>
open_type_os2_panose: Option<Os2Panose>
open_type_os2_selection: Option<Vec<u8>>
open_type_os2_strikeout_position: Option<i32>
open_type_os2_strikeout_size: Option<i32>
open_type_os2_subscript_x_offset: Option<i32>
open_type_os2_subscript_x_size: Option<i32>
open_type_os2_subscript_y_offset: Option<i32>
open_type_os2_subscript_y_size: Option<i32>
open_type_os2_superscript_x_offset: Option<i32>
open_type_os2_superscript_x_size: Option<i32>
open_type_os2_superscript_y_offset: Option<i32>
open_type_os2_superscript_y_size: Option<i32>
open_type_os2_type: Option<Vec<u8>>
open_type_os2_typo_ascender: Option<i32>
open_type_os2_typo_descender: Option<i32>
open_type_os2_typo_line_gap: Option<i32>
open_type_os2_unicode_ranges: Option<Vec<u8>>
open_type_os2_vendor_id: Option<String>
open_type_os2_weight_class: Option<u32>
open_type_os2_width_class: Option<Os2WidthClass>
open_type_os2_win_ascent: Option<u32>
open_type_os2_win_descent: Option<u32>
open_type_vhea_caret_offset: Option<i32>
open_type_vhea_caret_slope_rise: Option<i32>
open_type_vhea_caret_slope_run: Option<i32>
open_type_vhea_vert_typo_ascender: Option<i32>
open_type_vhea_vert_typo_descender: Option<i32>
open_type_vhea_vert_typo_line_gap: Option<i32>
postscript_blue_fuzz: Option<IntegerOrFloat>
postscript_blue_scale: Option<f64>
postscript_blue_shift: Option<IntegerOrFloat>
postscript_blue_values: Option<Vec<IntegerOrFloat>>
postscript_default_character: Option<String>
postscript_default_width_x: Option<IntegerOrFloat>
postscript_family_blues: Option<Vec<IntegerOrFloat>>
postscript_family_other_blues: Option<Vec<IntegerOrFloat>>
postscript_font_name: Option<String>
postscript_force_bold: Option<bool>
postscript_full_name: Option<String>
postscript_is_fixed_pitch: Option<bool>
postscript_nominal_width_x: Option<IntegerOrFloat>
postscript_other_blues: Option<Vec<IntegerOrFloat>>
postscript_slant_angle: Option<IntegerOrFloat>
postscript_stem_snap_h: Option<Vec<IntegerOrFloat>>
postscript_stem_snap_v: Option<Vec<IntegerOrFloat>>
postscript_underline_position: Option<IntegerOrFloat>
postscript_underline_thickness: Option<IntegerOrFloat>
postscript_unique_id: Option<i32>
postscript_weight_name: Option<String>
postscript_windows_character_set: Option<PostscriptWindowsCharacterSet>
style_map_family_name: Option<String>
style_map_style_name: Option<StyleMapStyle>
style_name: Option<String>
trademark: Option<String>
units_per_em: Option<NonNegativeIntegerOrFloat>
version_major: Option<i32>
version_minor: Option<u32>
woff_major_version: Option<u32>
woff_metadata_copyright: Option<WoffMetadataCopyright>
woff_metadata_credits: Option<WoffMetadataCredits>
woff_metadata_description: Option<WoffMetadataDescription>
woff_metadata_extensions: Option<Vec<WoffMetadataExtensionRecord>>
woff_metadata_license: Option<WoffMetadataLicense>
woff_metadata_licensee: Option<WoffMetadataLicensee>
woff_metadata_trademark: Option<WoffMetadataTrademark>
woff_metadata_unique_id: Option<WoffMetadataUniqueId>
woff_metadata_vendor: Option<WoffMetadataVendor>
woff_minor_version: Option<u32>
x_height: Option<IntegerOrFloat>
year: Option<i32>
Implementations
Create FontInfo from a file, upgrading from the supplied format_version to the highest internally supported version.
The conversion follows what ufoLib and defcon are doing, e.g. various fields that were implicitly signed integers before and are unsigned integers in the newest spec, are converted by taking their absolute value. Fields that could be floats before and are integers now are rounded. Fields that could be floats before and are unsigned integers now are rounded before taking their absolute value.
Returns false
if this FontInfo has any non-default value, and true
otherwise.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for FontInfo
impl UnwindSafe for FontInfo
Blanket Implementations
Mutably borrows from an owned value. Read more