[feaLib] cvXX feature test
This commit is contained in:
parent
f6bcea960d
commit
a7fcde030e
@ -61,7 +61,7 @@ class BuilderTest(unittest.TestCase):
|
||||
spec4h1 spec4h2 spec5d1 spec5d2 spec5fi1 spec5fi2 spec5fi3 spec5fi4
|
||||
spec5f_ii_1 spec5f_ii_2 spec5f_ii_3 spec5f_ii_4
|
||||
spec5h1 spec6b_ii spec6d2 spec6e spec6f
|
||||
spec6h_ii spec6h_iii_1 spec6h_iii_3d spec8a spec8b spec8c
|
||||
spec6h_ii spec6h_iii_1 spec6h_iii_3d spec8a spec8b spec8c spec8d
|
||||
spec9a spec9b spec9c1 spec9c2 spec9c3 spec9d spec9e spec9f spec9g
|
||||
spec10
|
||||
bug453 bug457 bug463 bug501 bug502 bug504 bug505 bug506 bug509
|
||||
|
45
Tests/feaLib/data/spec8d.fea
Normal file
45
Tests/feaLib/data/spec8d.fea
Normal file
@ -0,0 +1,45 @@
|
||||
# The cvParameters block must precede any of the rules in the feature.
|
||||
# The ParamUILabelNameID entry may be omitted or repeated as often as needed.
|
||||
# The other NameID types may be omitted, or defined only once.
|
||||
# The NameID entries must be specified in the order listed below.
|
||||
|
||||
# Following the set of NameID entries, a series of 24-bit Unicode values may be specified.
|
||||
# These provide Unicode values for the base glyphs referenced by the feature.
|
||||
# The developer may specify none, some, or all of the Unicode values for the base glyphs.
|
||||
# The Unicode value may be written with either decimal or hexadecimal notation.
|
||||
# The value must be preceded by '0x' if it is a hexadecimal value.
|
||||
|
||||
# NOTE: The ParamUILabelNameID entries are used when one base glyph is mapped to more than
|
||||
# one variant; the font designer may then specify one ParamUILabelNameID for each variant, in
|
||||
# order to uniquely describe that variant. If any ParamUILabelNameID entries are specified,
|
||||
# the number of ParamUILabelNameID entries must match the number of variants for each base
|
||||
# glyph. If the Character Variant feature specifies more than one base glyph, then the set
|
||||
# of NameID entries in the parameter block will be used for each base glyph and its variants.
|
||||
feature cv01 {
|
||||
cvParameters {
|
||||
FeatUILabelNameID {
|
||||
name 3 1 0x0409 "uilabel simple a"; # English US
|
||||
name 1 0 0 "uilabel simple a"; # Mac English
|
||||
};
|
||||
FeatUITooltipTextNameID {
|
||||
name 3 1 0x0409 "tool tip simple a"; # English US
|
||||
name 1 0 0 "tool tip simple a"; # Mac English
|
||||
};
|
||||
SampleTextNameID {
|
||||
name 3 1 0x0409 "sample text simple a"; # English US
|
||||
name 1 0 0 "sample text simple a"; # Mac English
|
||||
};
|
||||
ParamUILabelNameID {
|
||||
name 3 1 0x0409 "param1 text simple a"; # English US
|
||||
name 1 0 0 "param1 text simple a"; # Mac English
|
||||
};
|
||||
ParamUILabelNameID {
|
||||
name 3 1 0x0409 "param2 text simple a"; # English US
|
||||
name 1 0 0 "param2 text simple a"; # Mac English
|
||||
};
|
||||
Character 10;
|
||||
Character 0x5DDE;
|
||||
};
|
||||
# --- rules for this feature ---
|
||||
sub A by B;
|
||||
} cv01;
|
87
Tests/feaLib/data/spec8d.ttx
Normal file
87
Tests/feaLib/data/spec8d.ttx
Normal file
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ttFont>
|
||||
|
||||
<name>
|
||||
<namerecord nameID="256" platformID="3" platEncID="1" langID="0x409">
|
||||
uilabel simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="256" platformID="1" platEncID="0" langID="0x0" unicode="True">
|
||||
uilabel simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="257" platformID="3" platEncID="1" langID="0x409">
|
||||
tool tip simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="257" platformID="1" platEncID="0" langID="0x0" unicode="True">
|
||||
tool tip simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="258" platformID="3" platEncID="1" langID="0x409">
|
||||
sample text simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="258" platformID="1" platEncID="0" langID="0x0" unicode="True">
|
||||
sample text simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="259" platformID="3" platEncID="1" langID="0x409">
|
||||
param1 text simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="259" platformID="1" platEncID="0" langID="0x0" unicode="True">
|
||||
param1 text simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="260" platformID="3" platEncID="1" langID="0x409">
|
||||
param2 text simple a
|
||||
</namerecord>
|
||||
<namerecord nameID="260" platformID="1" platEncID="0" langID="0x0" unicode="True">
|
||||
param2 text simple a
|
||||
</namerecord>
|
||||
</name>
|
||||
|
||||
<GSUB>
|
||||
<Version value="0x00010000"/>
|
||||
<ScriptList>
|
||||
<!-- ScriptCount=1 -->
|
||||
<ScriptRecord index="0">
|
||||
<ScriptTag value="DFLT"/>
|
||||
<Script>
|
||||
<DefaultLangSys>
|
||||
<ReqFeatureIndex value="65535"/>
|
||||
<!-- FeatureCount=1 -->
|
||||
<FeatureIndex index="0" value="0"/>
|
||||
</DefaultLangSys>
|
||||
<!-- LangSysCount=0 -->
|
||||
</Script>
|
||||
</ScriptRecord>
|
||||
</ScriptList>
|
||||
<FeatureList>
|
||||
<!-- FeatureCount=1 -->
|
||||
<FeatureRecord index="0">
|
||||
<FeatureTag value="cv01"/>
|
||||
<Feature>
|
||||
<FeatureParamsCharacterVariants Format="0">
|
||||
<Format value="0"/>
|
||||
<FeatUILabelNameID value="256"/> <!-- uilabel simple a -->
|
||||
<FeatUITooltipTextNameID value="257"/> <!-- tool tip simple a -->
|
||||
<SampleTextNameID value="258"/> <!-- sample text simple a -->
|
||||
<NumNamedParameters value="2"/>
|
||||
<FirstParamUILabelNameID value="259"/> <!-- param1 text simple a -->
|
||||
<!-- CharCount=2 -->
|
||||
<Character index="0" value="10"/>
|
||||
<Character index="1" value="24030"/>
|
||||
</FeatureParamsCharacterVariants>
|
||||
<!-- LookupCount=1 -->
|
||||
<LookupListIndex index="0" value="0"/>
|
||||
</Feature>
|
||||
</FeatureRecord>
|
||||
</FeatureList>
|
||||
<LookupList>
|
||||
<!-- LookupCount=1 -->
|
||||
<Lookup index="0">
|
||||
<LookupType value="1"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<SingleSubst index="0">
|
||||
<Substitution in="A" out="B"/>
|
||||
</SingleSubst>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
</GSUB>
|
||||
|
||||
</ttFont>
|
Loading…
x
Reference in New Issue
Block a user