pub struct InputTemplate {Show 19 fields
pub input: Vec<u8>,
pub out_dir: Option<String>,
pub css: Option<CssProperties>,
pub target_type: Option<String>,
pub subsets: Vec<Vec<u8>>,
pub chunk_size: Option<i32>,
pub chunk_size_tolerance: Option<f32>,
pub max_allow_subsets_count: Option<i32>,
pub test_html: Option<bool>,
pub reporter: Option<bool>,
pub preview_image: Option<PreviewImage>,
pub rename_output_font: Option<String>,
pub build_mode: Option<String>,
pub language_areas: Option<bool>,
pub multi_threads: Option<bool>,
pub font_feature: Option<bool>,
pub reduce_mins: Option<bool>,
pub auto_subset: Option<bool>,
pub subset_remain_chars: Option<bool>,
}Fields§
§input: Vec<u8>ttf 文件的 buffer
out_dir: Option<String>切割后放置文件的文件夹
css: Option<CssProperties>CSS 配置
target_type: Option<String>目标类型
subsets: Vec<Vec<u8>>子集
chunk_size: Option<i32>包大小
chunk_size_tolerance: Option<f32>包大小容差
max_allow_subsets_count: Option<i32>最大允许子集数量
test_html: Option<bool>是否生成测试 HTML
reporter: Option<bool>是否生成 reporter.bin
preview_image: Option<PreviewImage>预览图像
rename_output_font: Option<String>重命名输出字体
build_mode: Option<String>TODO 构建模式
language_areas: Option<bool>是否进行语言区域优化
multi_threads: Option<bool>TODO 是否使用多线程
font_feature: Option<bool>是否启用字体特性
reduce_mins: Option<bool>TODO 是否减少最小分包,
auto_subset: Option<bool>是否自动子集化
subset_remain_chars: Option<bool>是否自动添加没有声明的字符
Implementations§
Source§impl InputTemplate
impl InputTemplate
Sourcepub fn out_dir(&self) -> &str
pub fn out_dir(&self) -> &str
Returns the value of out_dir, or the default value if out_dir is unset.
Sourcepub fn target_type(&self) -> &str
pub fn target_type(&self) -> &str
Returns the value of target_type, or the default value if target_type is unset.
Sourcepub fn language_areas(&self) -> bool
pub fn language_areas(&self) -> bool
Returns the value of language_areas, or the default value if language_areas is unset.
Sourcepub fn chunk_size(&self) -> i32
pub fn chunk_size(&self) -> i32
Returns the value of chunk_size, or the default value if chunk_size is unset.
Sourcepub fn chunk_size_tolerance(&self) -> f32
pub fn chunk_size_tolerance(&self) -> f32
Returns the value of chunk_size_tolerance, or the default value if chunk_size_tolerance is unset.
Sourcepub fn max_allow_subsets_count(&self) -> i32
pub fn max_allow_subsets_count(&self) -> i32
Returns the value of max_allow_subsets_count, or the default value if max_allow_subsets_count is unset.
Sourcepub fn test_html(&self) -> bool
pub fn test_html(&self) -> bool
Returns the value of test_html, or the default value if test_html is unset.
Sourcepub fn reporter(&self) -> bool
pub fn reporter(&self) -> bool
Returns the value of reporter, or the default value if reporter is unset.
Sourcepub fn rename_output_font(&self) -> &str
pub fn rename_output_font(&self) -> &str
Returns the value of rename_output_font, or the default value if rename_output_font is unset.
Sourcepub fn build_mode(&self) -> &str
pub fn build_mode(&self) -> &str
Returns the value of build_mode, or the default value if build_mode is unset.
Sourcepub fn multi_threads(&self) -> bool
pub fn multi_threads(&self) -> bool
Returns the value of multi_threads, or the default value if multi_threads is unset.
Sourcepub fn font_feature(&self) -> bool
pub fn font_feature(&self) -> bool
Returns the value of font_feature, or the default value if font_feature is unset.
Sourcepub fn reduce_mins(&self) -> bool
pub fn reduce_mins(&self) -> bool
Returns the value of reduce_mins, or the default value if reduce_mins is unset.
Sourcepub fn auto_subset(&self) -> bool
pub fn auto_subset(&self) -> bool
Returns the value of auto_subset, or the default value if auto_subset is unset.
Sourcepub fn subset_remain_chars(&self) -> bool
pub fn subset_remain_chars(&self) -> bool
Returns the value of subset_remain_chars, or the default value if subset_remain_chars is unset.
Trait Implementations§
Source§impl Clone for InputTemplate
impl Clone for InputTemplate
Source§fn clone(&self) -> InputTemplate
fn clone(&self) -> InputTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputTemplate
impl Debug for InputTemplate
Source§impl Default for InputTemplate
impl Default for InputTemplate
Source§impl Message for InputTemplate
impl Message for InputTemplate
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.