fix(engine): layer.setText schema requires optional OpenType keys (#520)
- Mark OpenType? and ss01? as optional in params doc - Fix clippy lint: use as_chunks instead of chunks_exact
This commit is contained in:
@@ -372,7 +372,7 @@ pub fn parse_spimtx(text: &str) -> Option<FileXform> {
|
|||||||
}
|
}
|
||||||
let mut m = [0.0; 16];
|
let mut m = [0.0; 16];
|
||||||
let mut offset = [0.0; 4];
|
let mut offset = [0.0; 4];
|
||||||
for (r, row) in v.chunks_exact(4).enumerate() {
|
for (r, row) in v.as_chunks::<4>().0.iter().enumerate() {
|
||||||
m[r * 4..r * 4 + 3].copy_from_slice(&row[..3]);
|
m[r * 4..r * 4 + 3].copy_from_slice(&row[..3]);
|
||||||
offset[r] = row[3] / 65535.0;
|
offset[r] = row[3] / 65535.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1402,7 +1402,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
|||||||
"Edit Text",
|
"Edit Text",
|
||||||
[],
|
[],
|
||||||
None,
|
None,
|
||||||
"{layer?, range?: [start, end] (characters; default all), text?, font?, style?, size?, fill?, stroke?, applyFill?, applyStroke?, strokeWidth?, tracking?, leading?: px|\"auto\", baselineShift? px, hScale? %, vScale? %, tsume? %, fauxBold?, fauxItalic?, allCaps?, smallCaps?, baseline?: normal|superscript|subscript, superscript?, subscript?, kerning?: metrics|optical|number, ligatures?, OpenType: discretionaryLigatures?, contextualAlternates?, stylisticAlternates?, stylisticSets?: [1–20], ss01…ss20?, swash?, titling?, ordinals?, fractions?, allSmallCaps?, figureStyle?: default|lining|oldStyle, figureWidth?: default|proportional|tabular, figures?, variations?: {tag: value} (variable font axes; null resets), justify?: left|center|right|justifyLeft|justifyCenter|justifyRight|justifyAll, indentLeft?, indentRight?, indentFirst?, spaceBefore?, spaceAfter?, direction?: ltr|rtl, composer?: everyLine|singleLine, hangingPunctuation?, strokeOverFill?, box?: [x,y,w,h]|null (layer space), vertical?}",
|
"{layer?, range?: [start, end] (characters; default all), text?, font?, style?, size?, fill?, stroke?, applyFill?, applyStroke?, strokeWidth?, tracking?, leading?: px|\"auto\", baselineShift? px, hScale? %, vScale? %, tsume? %, fauxBold?, fauxItalic?, allCaps?, smallCaps?, baseline?: normal|superscript|subscript, superscript?, subscript?, kerning?: metrics|optical|number, ligatures?, OpenType?: discretionaryLigatures?, contextualAlternates?, stylisticAlternates?, stylisticSets?: [1–20], ss01?…ss20?, swash?, titling?, ordinals?, fractions?, allSmallCaps?, figureStyle?: default|lining|oldStyle, figureWidth?: default|proportional|tabular, figures?, variations?: {tag: value} (variable font axes; null resets), justify?: left|center|right|justifyLeft|justifyCenter|justifyRight|justifyAll, indentLeft?, indentRight?, indentFirst?, spaceBefore?, spaceAfter?, direction?: ltr|rtl, composer?: everyLine|singleLine, hangingPunctuation?, strokeOverFill?, box?: [x,y,w,h]|null (layer space), vertical?}",
|
||||||
has_layers,
|
has_layers,
|
||||||
set_text
|
set_text
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user