Fix the metrics of wide characters, making Extended families compatible with FontConfig’s “dual” width (#1247).
This commit is contained in:
parent
8270d53730
commit
81827f16ba
15 changed files with 14 additions and 8 deletions
|
@ -1,3 +0,0 @@
|
||||||
* Change the shape of Eng (`U+014A`) into "N with Hook", to follow Unicode code chart (#1239).
|
|
||||||
* Increase shoulder arc thickness of lowercase `r` for better thickness contrast (#1243).
|
|
||||||
* Fixed width and removal logic for Long Leftwards Arrow (`U+27F5`) and Long Rightwards Arrow (`U+27F6`) (#1245).
|
|
4
changes/11.0.0.md
Normal file
4
changes/11.0.0.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
* \[**Breaking**\] Fix the metrics of wide characters, making Extended families compatible with FontConfig’s “dual” width (#1247).
|
||||||
|
* \[**Breaking**\] Fixed width and removal logic for Long Leftwards Arrow (`U+27F5`) and Long Rightwards Arrow (`U+27F6`) (#1245).
|
||||||
|
* Change the shape of Eng (`U+014A`) into "N with Hook", to follow Unicode code chart (#1239).
|
||||||
|
* Increase shoulder arc thickness of lowercase `r` for better thickness contrast (#1243).
|
|
@ -31,11 +31,16 @@ function assignSubRank(glyphStore) {
|
||||||
// (AW > 0) have the same width. We use this method to validate whether our "Fixed" subfamilies
|
// (AW > 0) have the same width. We use this method to validate whether our "Fixed" subfamilies
|
||||||
// are properly built.
|
// are properly built.
|
||||||
function validateMonospace(para, glyphStore) {
|
function validateMonospace(para, glyphStore) {
|
||||||
if (!para.forceMonospace) return;
|
|
||||||
let awSet = new Set();
|
let awSet = new Set();
|
||||||
for (const [u, g] of glyphStore.encodedEntries()) {
|
for (const [u, g] of glyphStore.encodedEntries()) {
|
||||||
const aw = Math.round(g.advanceWidth || 0);
|
const aw = Math.round(g.advanceWidth || 0);
|
||||||
if (aw > 0) awSet.add(aw);
|
if (aw > 0) awSet.add(aw);
|
||||||
}
|
}
|
||||||
if (awSet.size > 1) throw new Error("Unreachable! Fixed variant has wide characters");
|
if (para.forceMonospace && awSet.size > 1) {
|
||||||
|
throw new Error("Unreachable! Fixed variant has wide characters");
|
||||||
|
}
|
||||||
|
if (!para.isQuasiProportional && awSet.size > 2) {
|
||||||
|
console.log(awSet);
|
||||||
|
throw new Error("Unreachable! Fixed variant has wide characters");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ export : define [calculateMetrics para] : begin
|
||||||
define OneBalance : fallback para.onebalance 0
|
define OneBalance : fallback para.onebalance 0
|
||||||
|
|
||||||
# derived metrics
|
# derived metrics
|
||||||
define WideWidth0 : if para.isQuasiProportional (Width * 2) UPM
|
define WideWidth0 : if para.isQuasiProportional UPM (Width * 2)
|
||||||
define WideWidth1 : if (para.spacing >= 1) WideWidth0 Width
|
define WideWidth1 : if (para.spacing >= 1) WideWidth0 Width
|
||||||
define WideWidth2 : if (para.spacing >= 2) WideWidth0 Width
|
define WideWidth2 : if (para.spacing >= 2) WideWidth0 Width
|
||||||
define WideWidth3 : if (para.spacing >= 3) WideWidth0 Width
|
define WideWidth3 : if (para.spacing >= 3) WideWidth0 Width
|
||||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iosevka",
|
"name": "iosevka",
|
||||||
"version": "10.4.0",
|
"version": "11.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iosevka",
|
"name": "iosevka",
|
||||||
"version": "10.4.0",
|
"version": "11.0.0",
|
||||||
"main": "./font-src/index.js",
|
"main": "./font-src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node utility/ensure-verda-exists && verda -f verdafile.js",
|
"build": "node utility/ensure-verda-exists && verda -f verdafile.js",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue