HOTFIX: Some composite letters' CV/SS doesn't work
This commit is contained in:
parent
8346258ca5
commit
cbd5952ca3
3 changed files with 18 additions and 4 deletions
|
@ -28,6 +28,6 @@ module.exports = function (para) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
finalizeFont(para, gs.glyphStore, excludeChars, font);
|
const finalGs = finalizeFont(para, gs.glyphStore, excludeChars, font);
|
||||||
return { font, glyphStore: gs.glyphStore };
|
return { font, glyphStore: finalGs };
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,9 @@ const gcFont = require("./gc");
|
||||||
module.exports = function finalizeFont(para, glyphStore, excludedCodePoints, font) {
|
module.exports = function finalizeFont(para, glyphStore, excludedCodePoints, font) {
|
||||||
glyphStore = forceMonospaceIfNeeded(para, glyphStore);
|
glyphStore = forceMonospaceIfNeeded(para, glyphStore);
|
||||||
glyphStore = gcFont(glyphStore, excludedCodePoints, font, {});
|
glyphStore = gcFont(glyphStore, excludedCodePoints, font, {});
|
||||||
extractGlyfCmap(regulateGlyphStore(para, glyphStore), font);
|
glyphStore = regulateGlyphStore(para, glyphStore);
|
||||||
|
extractGlyfCmap(glyphStore, font);
|
||||||
|
return glyphStore;
|
||||||
};
|
};
|
||||||
|
|
||||||
function forceMonospaceIfNeeded(para, glyphStore) {
|
function forceMonospaceIfNeeded(para, glyphStore) {
|
||||||
|
|
|
@ -104,6 +104,15 @@ glyph-block AutoBuild-Accents : begin
|
||||||
set foundDecompositions.(glyphName) { glyphName code parts }
|
set foundDecompositions.(glyphName) { glyphName code parts }
|
||||||
|
|
||||||
local s_parts nothing
|
local s_parts nothing
|
||||||
|
|
||||||
|
define [recursivelyDecompose g sink] : begin
|
||||||
|
local decomposition : CvDecompose.get g
|
||||||
|
if decomposition : foreach gnPart [items-of decomposition] : begin
|
||||||
|
local g : query-glyph gnPart
|
||||||
|
if g : recursivelyDecompose g sink
|
||||||
|
: else : begin
|
||||||
|
sink.push : glyphStore.queryNameOf g
|
||||||
|
|
||||||
define construction : glyph-proc
|
define construction : glyph-proc
|
||||||
include s_parts.0 AS_BASE ALSO_METRICS
|
include s_parts.0 AS_BASE ALSO_METRICS
|
||||||
foreach part [items-of : s_parts.slice 1] : if part : begin
|
foreach part [items-of : s_parts.slice 1] : if part : begin
|
||||||
|
@ -111,7 +120,10 @@ glyph-block AutoBuild-Accents : begin
|
||||||
if (part.markAnchors && part.markAnchors.bottomright) : begin
|
if (part.markAnchors && part.markAnchors.bottomright) : begin
|
||||||
eject-contour 'serifRB'
|
eject-contour 'serifRB'
|
||||||
if [AnyDerivingCv.query s_parts.0] : begin
|
if [AnyDerivingCv.query s_parts.0] : begin
|
||||||
CvDecompose.set currentGlyph [s_parts.map : lambda [x] : glyphStore.queryNameOf x]
|
local decomposeParts { }
|
||||||
|
foreach part [items-of s_parts] : begin
|
||||||
|
recursivelyDecompose part decomposeParts
|
||||||
|
CvDecompose.set currentGlyph decomposeParts
|
||||||
|
|
||||||
define [RootGlyphProc goalName code parts] : begin
|
define [RootGlyphProc goalName code parts] : begin
|
||||||
set s_parts parts
|
set s_parts parts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue