Make variant selectors of A
and E
able to influence AE and OE letters (#1031).
This commit is contained in:
parent
6556e4f883
commit
ce12d99f53
7 changed files with 139 additions and 60 deletions
|
@ -1,5 +1,6 @@
|
|||
- Force all variants of mathematical sans-serif characters to remove all serifs, including motion serifs (#1030).
|
||||
- Fix broken variant selectors for Polytonic Greek letters with dual-diacritics (#1031).
|
||||
- Make variant selectors of `A` and `E` able to influence AE and OE letters (#1031).
|
||||
- Make combining parentheses more significant (#1032).
|
||||
- Make `cv02` apply to B with bar (#1033).
|
||||
- Fix shape of Copyleft Symbol `U+1F12F` (#1034).
|
|
@ -1,7 +1,7 @@
|
|||
###### Automatic builds
|
||||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Dotless AnyDerivingCv DotlessOrNot getGrTree CvDecompose ZReduced] from "../../support/gr"
|
||||
import [Dotless AnyDerivingCv DotlessOrNot getGrTree CvDecompose CcmpDecompose ZReduced RequireCcmpDecompose] from "../../support/gr"
|
||||
import [fallback] from '../../support/utils'
|
||||
|
||||
glyph-module
|
||||
|
@ -137,6 +137,10 @@ glyph-block AutoBuild-Accents : begin
|
|||
local decomposeParts { }
|
||||
foreach part [items-of s_parts] : recursivelyDecompose part decomposeParts
|
||||
CvDecompose.set currentGlyph decomposeParts
|
||||
if [RequireCcmpDecompose.get s_parts.0] : begin
|
||||
local ccmpParts { }
|
||||
foreach part [items-of s_parts] : ccmpParts.push : glyphStore.queryNameOf part
|
||||
CcmpDecompose.set currentGlyph ccmpParts
|
||||
|
||||
define [RootGlyphProc goalName code parts] : begin
|
||||
set s_goalName goalName
|
||||
|
|
|
@ -2,7 +2,7 @@ $$include '../../../meta/macros.ptl'
|
|||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
import [Dotless CvDecompose] from "../../../support/gr"
|
||||
import [Dotless CvDecompose RequireCcmpDecompose] from "../../../support/gr"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -118,8 +118,8 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
include : ePartshape df
|
||||
create-glyph "ue/e.\(suffix)" : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
set-width 0
|
||||
set-base-anchor 'cvDecompose' 0 0
|
||||
include : ePartshape df
|
||||
|
||||
|
||||
|
@ -131,6 +131,8 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
create-glyph "ue/u.\(suffix)" : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
set-width 0
|
||||
include : df.markSet.e
|
||||
set-base-anchor 'cvDecompose' 0 0 0 0
|
||||
include : ueUPart df fSlab
|
||||
|
||||
select-variant 'ae' 0xE6
|
||||
|
@ -144,8 +146,8 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
select-variant "ue/u"
|
||||
|
||||
create-glyph 'ue' 0x1D6B : glyph-proc
|
||||
include [refer-glyph "ue/u"]
|
||||
include [refer-glyph "ue/e"] AS_BASE ALSO_METRICS
|
||||
include [refer-glyph "ue/u"] AS_BASE ALSO_METRICS
|
||||
include [refer-glyph "ue/e"]
|
||||
CvDecompose.set currentGlyph { 'ue/u' 'ue/e' }
|
||||
|
||||
create-glyph 'db' 0x238 : glyph-proc
|
||||
|
|
|
@ -2,7 +2,7 @@ $$include '../../../meta/macros.ptl'
|
|||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
import [Dotless CvDecompose] from "../../../support/gr"
|
||||
import [Dotless CvDecompose RequireCcmpDecompose] from "../../../support/gr"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -11,6 +11,16 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
|
|||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Latin-Upper-F : EFVJutLength
|
||||
|
||||
define SLAB-A-NONE 0
|
||||
define SLAB-A-TOP 1
|
||||
define SLAB-A-BASE 2
|
||||
define SLAB-A-TRI 3
|
||||
|
||||
define SLAB-E-NONE 0
|
||||
define SLAB-E-ALL 2
|
||||
|
||||
define [AESW df top] : Math.min df.mvs : AdviceStroke2 3 3 top df.div
|
||||
|
||||
define [AEAHalfCurly df top eleft sw] : glyph-proc
|
||||
define fine : AdviceStroke2 3 4 top df.div
|
||||
|
||||
|
@ -62,58 +72,103 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
|
|||
corner eleft top
|
||||
corner eleft 0
|
||||
|
||||
define [AEShape df top straight] : glyph-proc
|
||||
define eBarPos : DesignParameters.upperEBarPos SLAB
|
||||
define [AEAHalfSerifs df top slabKind] : glyph-proc
|
||||
define sw : Math.min df.mvs : AdviceStroke2 3 3 top df.div
|
||||
define eleft : df.middle - sw * 0.25 * HVContrast
|
||||
define swVJut : Math.min sw ((df.rightSB - eleft - sw * HVContrast) * (4 / 5))
|
||||
local turn : XH * 0.1
|
||||
match slabKind
|
||||
([Just SLAB-A-BASE] || [Just SLAB-A-TRI]) : begin
|
||||
include : CenterBottomSerif (df.leftSB + sw / 2 * HVContrast) 0 Jut sw
|
||||
match slabKind
|
||||
[Just SLAB-A-TRI] : begin
|
||||
include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25)
|
||||
[Just SLAB-A-TOP] : begin
|
||||
include : LeftwardTopSerif df.middle top [mix MidJutSide LongJut 0.5]
|
||||
|
||||
# A half
|
||||
if straight
|
||||
include : AEAHalfStraight df top eleft sw
|
||||
include : AEAHalfCurly df top eleft sw
|
||||
define [AEAHalf df top straight slabKind] : glyph-proc
|
||||
define sw : AESW df top
|
||||
define eleft : df.middle - sw * 0.25 * HVContrast
|
||||
include : if straight
|
||||
AEAHalfStraight df top eleft sw
|
||||
AEAHalfCurly df top eleft sw
|
||||
include : AEAHalfSerifs df top slabKind
|
||||
|
||||
define [AEEHalf df top slabKind] : glyph-proc
|
||||
define eBarPos : DesignParameters.upperEBarPos SLAB
|
||||
define sw : AESW df top
|
||||
define eleft : df.middle - sw * 0.25 * HVContrast
|
||||
define swVJut : Math.min sw ((df.rightSB - eleft - sw * HVContrast) * (4 / 5))
|
||||
|
||||
# E half
|
||||
include : VBarLeft eleft 0 top sw
|
||||
include : HBarTop (eleft - O) df.rightSB top
|
||||
include : HBar (eleft - O) (df.rightSB - sw / 4) (top * eBarPos)
|
||||
include : HBarBottom (eleft - O) df.rightSB 0
|
||||
if SLAB : begin
|
||||
local { jutTop jutBot } : EFVJutLength top eBarPos sw
|
||||
include : CenterBottomSerif (df.leftSB + sw / 2 * HVContrast) 0 Jut sw
|
||||
include : DownwardRightSerif df.rightSB top jutTop swVJut
|
||||
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
|
||||
match slabKind
|
||||
[Just SLAB-E-ALL] : begin
|
||||
local { jutTop jutBot } : EFVJutLength top eBarPos sw
|
||||
include : DownwardRightSerif df.rightSB top jutTop swVJut
|
||||
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
|
||||
|
||||
create-glyph 'AE.straight' : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : AEShape df CAP true
|
||||
define AConfig : object
|
||||
straightSerifless { true SLAB-A-NONE }
|
||||
curlySerifless { false SLAB-A-NONE }
|
||||
straightTopSerifed { true SLAB-A-TOP }
|
||||
curlyTopSerifed { false SLAB-A-TOP }
|
||||
straightBaseSerifed { true SLAB-A-BASE }
|
||||
curlyBaseSerifed { false SLAB-A-BASE }
|
||||
straightTriSerifed { true SLAB-A-TRI }
|
||||
curlyTriSerifed { false SLAB-A-TRI }
|
||||
|
||||
create-glyph 'AE.curly' : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : AEShape df CAP false
|
||||
define EConfig : object
|
||||
standard { [if SLAB SLAB-E-ALL SLAB-E-NONE] }
|
||||
motionSerifed { SLAB-E-NONE }
|
||||
|
||||
create-glyph 'smcpAE.straight' : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : AEShape df XH true
|
||||
foreach { suffix { fStraightBar slabKind } } [Object.entries AConfig] : do
|
||||
create-glyph "AE/AHalf.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
set-base-anchor 'cvDecompose' 0 0 0 0
|
||||
include : AEAHalf df CAP fStraightBar slabKind
|
||||
create-glyph "smcpAE/AHalf.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
set-base-anchor 'cvDecompose' 0 0 0 0
|
||||
include : AEAHalf df XH fStraightBar slabKind
|
||||
|
||||
create-glyph 'smcpAE.curly' : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : AEShape df XH false
|
||||
foreach { suffix { slabKind } } [Object.entries EConfig] : do
|
||||
create-glyph "AE/EHalf.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width 0
|
||||
set-mark-anchor 'cvDecompose' 0 0
|
||||
include : AEEHalf df CAP slabKind
|
||||
create-glyph "smcpAE/EHalf.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width 0
|
||||
set-mark-anchor 'cvDecompose' 0 0
|
||||
include : AEEHalf df XH slabKind
|
||||
|
||||
select-variant 'AE/AHalf' (follow -- 'A')
|
||||
select-variant 'AE/EHalf' (follow -- 'E')
|
||||
select-variant 'smcpAE/AHalf' (follow -- 'A')
|
||||
select-variant 'smcpAE/EHalf' (follow -- 'E')
|
||||
|
||||
create-glyph "AE" 0xC6 : glyph-proc
|
||||
include [refer-glyph 'AE/AHalf'] AS_BASE ALSO_METRICS
|
||||
include [refer-glyph 'AE/EHalf']
|
||||
CvDecompose.set currentGlyph { 'AE/AHalf' 'AE/EHalf' }
|
||||
|
||||
create-glyph "smcpAE" 0x1D01 : glyph-proc
|
||||
include [refer-glyph 'smcpAE/AHalf'] AS_BASE ALSO_METRICS
|
||||
include [refer-glyph 'smcpAE/EHalf']
|
||||
CvDecompose.set currentGlyph { 'smcpAE/AHalf' 'smcpAE/EHalf' }
|
||||
|
||||
select-variant 'AE' 0xC6
|
||||
select-variant 'smcpAE' 0x1D01 (follow -- 'AE')
|
||||
alias 'cyrl/AE' 0x4D4 'AE'
|
||||
if [query-glyph 'cyrl/AE'] : begin
|
||||
CvDecompose.set [query-glyph 'cyrl/AE'] { 'AE/AHalf' 'AE/EHalf' }
|
||||
|
||||
define [OEShape top df] : glyph-proc
|
||||
define [OEShape top df slabKind] : glyph-proc
|
||||
define eBarPos : DesignParameters.upperEBarPos SLAB
|
||||
define sw : Math.min df.mvs : AdviceStroke2 3 3 top df.div
|
||||
define eleft : df.middle - sw * [if SLAB (1 / 3) (1 / 4)] * HVContrast
|
||||
|
@ -135,19 +190,24 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
|
|||
include : HBar (eleft - O) (df.rightSB - sw / 4) (top * 0.54) sw
|
||||
include : HBarBottom (eleft - O) df.rightSB 0 sw
|
||||
|
||||
if SLAB : begin
|
||||
local { jutTop jutBot } : EFVJutLength top eBarPos sw
|
||||
include : DownwardRightSerif df.rightSB top jutTop swVJut
|
||||
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
|
||||
match slabKind
|
||||
[Just SLAB-E-ALL] : begin
|
||||
local { jutTop jutBot } : EFVJutLength top eBarPos sw
|
||||
include : DownwardRightSerif df.rightSB top jutTop swVJut
|
||||
include : UpwardRightSerif df.rightSB 0 jutBot swVJut
|
||||
|
||||
create-glyph 'OE' 0x152 : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : OEShape CAP df
|
||||
|
||||
create-glyph 'smcpOE' 0x276 : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : OEShape XH df
|
||||
foreach { suffix { slabKind } } [Object.entries EConfig] : do
|
||||
create-glyph "OE.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : OEShape CAP df slabKind
|
||||
create-glyph "smcpOE.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
set-width df.width
|
||||
include : df.markSet.e
|
||||
include : OEShape XH df slabKind
|
||||
|
||||
select-variant 'OE' 0x152 (follow -- 'E')
|
||||
select-variant 'smcpOE' 0x276 (follow -- 'E')
|
|
@ -3,7 +3,7 @@ extern Set
|
|||
|
||||
define MarkClasses {
|
||||
'above' 'below' 'overlay' 'slash' 'topright' 'bottomright'
|
||||
'trailing' 'lf' 'tieAbove' 'tieBelow' 'aboveBrace' 'belowBrace'
|
||||
'trailing' 'lf' 'tieAbove' 'tieBelow' 'aboveBrace' 'belowBrace' 'cvDecompose'
|
||||
'enclosureInner' 'enclosureInnerFirstHalf' 'enclosureInnerSecondHalf'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import [add-common-feature add-feature add-lookup ChainRuleBuilder BeginLookupBlock EndLookupBlock] from "./table-util"
|
||||
import [add-common-feature add-feature add-lookup add-feature-lookup ChainRuleBuilder BeginLookupBlock EndLookupBlock] from "./table-util"
|
||||
import [AnyCv Dotless TieMark TieGlyph CcmpDecompose] from "../support/gr"
|
||||
extern Set
|
||||
|
||||
|
@ -227,10 +227,10 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
if (parts && parts.length) : set decompositions.(gid) parts
|
||||
|
||||
if [objectIsNotEmpty decompositions] : begin
|
||||
ccmp.lookups.push lookupCcmp-Decompose
|
||||
define lookupCcmp-Decompose : add-lookup sink : object
|
||||
.type 'gsub_multiple'
|
||||
.substitutions decompositions
|
||||
add-feature-lookup ccmp lookupCcmp-Decompose
|
||||
|
||||
add-common-feature sink ccmp
|
||||
EndLookupBlock rec sink
|
||||
|
|
|
@ -97,6 +97,17 @@ const Radical = {
|
|||
}
|
||||
};
|
||||
|
||||
const RequireCcmpDecompose = {
|
||||
get(glyph) {
|
||||
if (glyph && glyph.related) return !!glyph.related.RequireCcmpDecompose;
|
||||
else return false;
|
||||
},
|
||||
set(glyph) {
|
||||
if (!glyph.related) glyph.related = {};
|
||||
glyph.related.RequireCcmpDecompose = true;
|
||||
}
|
||||
};
|
||||
|
||||
const CvTagCache = new Map();
|
||||
function Cv(tag, rank) {
|
||||
const key = tag + "#" + rank;
|
||||
|
@ -351,6 +362,7 @@ exports.getGrMesh = getGrMesh;
|
|||
exports.TieMark = TieMark;
|
||||
exports.TieGlyph = TieGlyph;
|
||||
exports.Radical = Radical;
|
||||
exports.RequireCcmpDecompose = RequireCcmpDecompose;
|
||||
exports.AnyDerivingCv = AnyDerivingCv;
|
||||
exports.CcmpDecompose = CcmpDecompose;
|
||||
exports.CvDecompose = CvDecompose;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue