Fix variant selection of CIRCLED ZERO WITH SLASH (U+1F10D
) (#1274).
This commit is contained in:
parent
3254815b2f
commit
1252b055a5
3 changed files with 21 additions and 4 deletions
1
changes/11.2.6.md
Normal file
1
changes/11.2.6.md
Normal file
|
@ -0,0 +1 @@
|
|||
* Fix variant selection of CIRCLED ZERO WITH SLASH (`U+1F10D`) (#1274).
|
|
@ -2,7 +2,7 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../support/utils'
|
||||
import [getGrMesh AnyCv CvDecompose Joining] from "../../support/gr"
|
||||
import [getGrMesh AnyCv CvDecompose Joining hashCv] from "../../support/gr"
|
||||
import [hashGeometry] from "../../support/geometry/index"
|
||||
import [Transform] from "../../support/geometry/transform"
|
||||
extern Map
|
||||
|
@ -121,11 +121,16 @@ glyph-block AutoBuild-Enclosure : begin
|
|||
define [EnclosureStrokeScale dscale digits width] : dscale / [Math.pow [AdjustDigitCount digits width] 0.66]
|
||||
|
||||
define enclosureInnerPartActualWidth : new Map
|
||||
|
||||
define [GlyphNameInnerOf gniPrefix subGlyph mp actualWidth accumulatedTfm] : begin
|
||||
define nameParts : list mp actualWidth accumulatedTfm
|
||||
hashGeometry subGlyph.geometry
|
||||
hashCv subGlyph
|
||||
return : '.ci.' + gniPrefix + '/' + [nameParts.join '/']
|
||||
|
||||
define [EnsureInnerSubGlyphImpl gniPrefix markClass miniatureFont mp actualWidth accumulatedTfm] : function [gidPart] : begin
|
||||
define subGlyph : miniatureFont.queryByNameEnsured gidPart
|
||||
define geomHash : hashGeometry subGlyph.geometry
|
||||
|
||||
define gniPart : '.ci.' + gniPrefix + '.' + geomHash + '@' + [{ mp actualWidth accumulatedTfm }.join '/']
|
||||
define gniPart : GlyphNameInnerOf gniPrefix subGlyph mp actualWidth accumulatedTfm
|
||||
if [not : query-glyph gniPart] : begin
|
||||
enclosureInnerPartActualWidth.set gniPart (actualWidth)
|
||||
create-glyph gniPart : glyph-proc
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const crypto = require("crypto");
|
||||
|
||||
const Dotless = {
|
||||
tag: "dtls",
|
||||
get(glyph) {
|
||||
|
@ -436,6 +438,14 @@ function linkSuffixPairGr(gs, tagCis, tagTrans, grCis, grTrans) {
|
|||
}
|
||||
}
|
||||
|
||||
function hashCv(g) {
|
||||
const hasher = crypto.createHash("sha256");
|
||||
for (const gr of AnyCv.query(g)) {
|
||||
hasher.update(`${gr.tag}/${gr.rank}:${gr.get(g)}\n`);
|
||||
}
|
||||
return hasher.digest("hex");
|
||||
}
|
||||
|
||||
exports.Dotless = Dotless;
|
||||
exports.LowerYDotAtBelow = LowerYDotAtBelow;
|
||||
exports.Cv = Cv;
|
||||
|
@ -461,6 +471,7 @@ exports.Onum = Onum;
|
|||
exports.AplForm = AplForm;
|
||||
exports.NumeratorForm = NumeratorForm;
|
||||
exports.DenominatorForm = DenominatorForm;
|
||||
exports.hashCv = hashCv;
|
||||
|
||||
exports.createGrDisplaySheet = createGrDisplaySheet;
|
||||
exports.linkSuffixGr = linkSuffixGr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue