googlefonts / googlefonts/gftools

BASE building script

Open
#1,086 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
283
Forks
73
Avg merge
21h 25m
Merged PRs (30d)
8

Description

In thinking through the [fontbakery check](https://github.com/fonttools/fontbakery/issues/5002) for the updated CJK metrics, I think that there is a method we could calculate a generic BASE table for CJ fonts that can be built into the builder tool for these fonts and help reduce the burden on designers to implement it themselves (if they feel uncomfortable doing so). For additional context and information about this, please check the other thread!

**Japanese/Chinese**
`永` (314A) is a common character for Chinese / Japanese fonts and is often used as a reference for establishing the BASE table.

```
MARGIN = (UPM-(B-A))/2
A = y-direction minimum of 永
B = y-direction maximum of 永
C = y-direction minimum of emBox: A - MARGIN
D = MARGIN
E = UPM - MARGIN / x-maximum of 永 + (x-minimum of 永)-D
```

**Korean**
Additionally, as not all Hangeul fonts will include ideographs, we must select alternate reference glyphs common to all fonts. To that end, I've suggested 밈 (BC08) & 모 (BAA8).
```
MARGIN = (UPM-(B-A))/2
A = y-direction minimum of 永 / y-direction minimum of 밈
B = y-direction maximum of 永 / y-direction minimum of 밈
C = y-direction minimum of emBox: A - MARGIN
D = MARGIN
E = UPM - MARGIN / x-maximum of 모 + ((x-minimum of 모)-D)

```

```
table BASE {
HorizAxis.BaseTagList icfb icft ideo romn;
HorizAxis.BaseScriptList
DFLT ideo A B C 0,
hani ideo A B C 0,
kana ideo A B C 0,
latn romn A B C 0;

VertAxis.BaseTagList icfb icft ideo romn;
VertAxis.BaseScriptList
DFLT ideo D E 0 -C,
hani ideo D E 0 -C,
kana ideo D E 0 -C,
latn romn D E 0 -C;
} BASE;
```

If the font also contains Cyrillic / Greek, we can duplicate the `latn` entry with `cyrl` and `grek`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.