Skip to content

Commit

Permalink
Bump east-asian-spacing to 1.3.0
Browse files Browse the repository at this point in the history
* Support adding `halt`/`vhal`.
* The `-g` option accepts `-` as stdout.
* Update config to suppress skip warnings.
* Update `test.html` to support `halt`/`vhal`.
* Update reference files.
* Update README.
  • Loading branch information
kojiishi committed Jul 31, 2021
1 parent 75480f5 commit 33a56b5
Show file tree
Hide file tree
Showing 147 changed files with 5,342 additions and 904 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

# chws_tool

This is a tool to add the OpenType [`chws`]/[`vchw`] features to OpenType fonts.
This tool adds the OpenType
[`chws`], [`vchw`], [`halt`], and [`vhal`]
features to OpenType fonts if any of these features are missing.
Please see [east-asian-sapcing] for details of these features.

This tool uses the [east-asian-sapcing] package as its core engine,
and has following advantages:
Expand All @@ -16,7 +19,9 @@ please see the [Adding Fonts] section below.

[east-asian-sapcing]: https://github.com/kojiishi/east_asian_spacing
[`chws`]: https://docs.microsoft.com/en-us/typography/opentype/spec/features_ae#tag-chws
[`halt`]: https://docs.microsoft.com/en-us/typography/opentype/spec/features_fj#tag-halt
[`vchw`]: https://docs.microsoft.com/en-us/typography/opentype/spec/features_uz#tag-vchw
[`vhal`]: https://docs.microsoft.com/en-us/typography/opentype/spec/features_uz#tag-vhal
[fonts.google.com]: https://fonts.google.com/

## Install
Expand Down
9 changes: 5 additions & 4 deletions references/DelaGothicOne-Regular.ttf-glyphs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
# middle
8847
8856
# space
8928
# vertical.left
8905
8907

# vertical.right

# vertical.middle
8917
8928

# vertical.space

54 changes: 44 additions & 10 deletions references/DelaGothicOne-Regular.ttf.G_P_O_S_.ttx.diff
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
- <!-- FeatureCount=3 -->
+ <!-- FeatureCount=4 -->
+ <!-- FeatureCount=5 -->
<FeatureIndex index="0" value="0"/>
<FeatureIndex index="1" value="3"/>
<FeatureIndex index="2" value="6"/>
+ <FeatureIndex index="3" value="9"/>
+ <FeatureIndex index="4" value="10"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
Expand All @@ -16,11 +17,12 @@
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
- <!-- FeatureCount=3 -->
+ <!-- FeatureCount=4 -->
+ <!-- FeatureCount=5 -->
<FeatureIndex index="0" value="1"/>
<FeatureIndex index="1" value="4"/>
<FeatureIndex index="2" value="7"/>
+ <FeatureIndex index="3" value="9"/>
+ <FeatureIndex index="4" value="10"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
Expand All @@ -29,19 +31,20 @@
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
- <!-- FeatureCount=3 -->
+ <!-- FeatureCount=4 -->
+ <!-- FeatureCount=5 -->
<FeatureIndex index="0" value="2"/>
<FeatureIndex index="1" value="5"/>
<FeatureIndex index="2" value="8"/>
+ <FeatureIndex index="3" value="9"/>
+ <FeatureIndex index="4" value="10"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
- <!-- FeatureCount=9 -->
+ <!-- FeatureCount=10 -->
+ <!-- FeatureCount=11 -->
<FeatureRecord index="0">
<FeatureTag value="kern"/>
<Feature>
Expand All @@ -50,17 +53,24 @@
</Feature>
</FeatureRecord>
+ <FeatureRecord index="9">
+ <FeatureTag value="halt"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="10"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="10">
+ <FeatureTag value="chws"/>
+ <Feature>
+ <!-- LookupCount=2 -->
+ <LookupListIndex index="0" value="10"/>
+ <LookupListIndex index="1" value="12"/>
+ <LookupListIndex index="0" value="11"/>
+ <LookupListIndex index="1" value="13"/>
+ </Feature>
+ </FeatureRecord>
</FeatureList>
<LookupList>
- <!-- LookupCount=10 -->
+ <!-- LookupCount=13 -->
+ <!-- LookupCount=14 -->
<Lookup index="0">
<LookupType value="2"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
Expand All @@ -69,6 +79,30 @@
</MarkMarkPos>
</Lookup>
+ <Lookup index="10">
+ <LookupType value="1"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=2 -->
+ <SinglePos index="0" Format="2">
+ <Coverage>
+ <Glyph value="uniFF1A"/>
+ <Glyph value="uniFF1B"/>
+ <Glyph value="uniFF08"/>
+ </Coverage>
+ <ValueFormat value="5"/>
+ <!-- ValueCount=3 -->
+ <Value index="0" XPlacement="-250" XAdvance="-500"/>
+ <Value index="1" XPlacement="-250" XAdvance="-500"/>
+ <Value index="2" XPlacement="-500" XAdvance="-500"/>
+ </SinglePos>
+ <SinglePos index="1" Format="1">
+ <Coverage>
+ <Glyph value="uniFF09"/>
+ </Coverage>
+ <ValueFormat value="4"/>
+ <Value XAdvance="-500"/>
+ </SinglePos>
+ </Lookup>
+ <Lookup index="11">
+ <LookupType value="2"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
Expand Down Expand Up @@ -99,7 +133,7 @@
+ </Class1Record>
+ </PairPos>
+ </Lookup>
+ <Lookup index="11">
+ <Lookup index="12">
+ <LookupType value="1"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
Expand All @@ -111,7 +145,7 @@
+ <Value XPlacement="-500" XAdvance="-500"/>
+ </SinglePos>
+ </Lookup>
+ <Lookup index="12">
+ <Lookup index="13">
+ <LookupType value="8"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
Expand All @@ -131,7 +165,7 @@
+ <!-- PosCount=1 -->
+ <PosLookupRecord index="0">
+ <SequenceIndex value="0"/>
+ <LookupListIndex value="11"/>
+ <LookupListIndex value="12"/>
+ </PosLookupRecord>
+ </ChainContextPos>
+ </Lookup>
Expand Down
6 changes: 3 additions & 3 deletions references/DelaGothicOne-Regular.ttf.tables.diff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Tag Size
GDEF 562 [0]
-GPOS 14,048 [0]
+GPOS 14,198 [0]
+GPOS 14,266 [0]
GSUB 5,034 [0]
OS/2 96 [0]
cmap 101,274 [0]
Expand All @@ -13,7 +13,7 @@
vmtx 36,190 [0]
-Total: 5,450,336
-Data: 5,450,004
+Total: 5,450,486
+Data: 5,450,154
+Total: 5,450,554
+Data: 5,450,222
Gap: 332
Tables: 19
6 changes: 4 additions & 2 deletions references/DotGothic16-Regular.ttf-glyphs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
687
7488
# middle
630
635
636
637
# space
630
# vertical.left
7761
7762
Expand Down Expand Up @@ -60,5 +61,6 @@
7824
8128
# vertical.middle
630
635
# vertical.space
630
3 changes: 3 additions & 0 deletions references/HachiMaruPop-Regular.ttf-glyphs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
7280
7284
7362
# space

# vertical.left
7276
7289
Expand All @@ -54,4 +56,5 @@
7330
# vertical.middle
7362
# vertical.space
7367
Loading

0 comments on commit 33a56b5

Please sign in to comment.