Fix placement of diacritics over uppercase Greek (#1115).
This commit is contained in:
parent
1e7bed47c7
commit
69de2a1450
17 changed files with 244 additions and 139 deletions
|
@ -1,4 +1,5 @@
|
|||
* Add single-spacing TTC and Super TTC (#1112).
|
||||
* Fix placement of diacritics over uppercase Greek (#1115).
|
||||
* Fix geometry of:
|
||||
- Latin Small Letter B with Stroke (`U+0180`) (#1115).
|
||||
- Latin Letter Capital Gha (`U+01A2`), Latin Letter Small Gha (`U+01A3`) (#1115).
|
|
@ -3,6 +3,7 @@ $$include '../../meta/macros.ptl'
|
|||
|
||||
import [Dotless AnyDerivingCv DotlessOrNot getGrTree CvDecompose CcmpDecompose RequireCcmpDecompose] from "../../support/gr"
|
||||
import [fallback] from '../../support/utils'
|
||||
import "../../meta/unicode-knowledge" as UnicodeKnowledge
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -26,12 +27,17 @@ glyph-block AutoBuild-Accents : begin
|
|||
# Build accented glyphs
|
||||
define [isAboveMark mark] : begin
|
||||
return : mark && mark.markAnchors && mark.markAnchors.above
|
||||
define [iotaBelowToLF p j parts] : if (p === [query-glyph 'iotaBelow']) : begin
|
||||
set parts.(j) [query-glyph 'iotaLF']
|
||||
define [ogonekBelowToTR p j parts] : if (p === [query-glyph 'ogonekBelow']) : begin
|
||||
set parts.(j) [query-glyph 'ogonekTR']
|
||||
|
||||
define [MarkSubst lookup] : function [p j parts] : begin
|
||||
foreach { k v } [Object.entries lookup] : begin
|
||||
if (p === [query-glyph k]) : set parts.(j) [query-glyph v]
|
||||
|
||||
define iotaBelowToLF : MarkSubst UnicodeKnowledge.iotaBelowToLfTf
|
||||
define ogonekBelowToTR : MarkSubst UnicodeKnowledge.ogonekBelowToTRTf
|
||||
define grekUpperTonos : MarkSubst UnicodeKnowledge.upperGrekMarkToTonosTf
|
||||
|
||||
define [subParts parts] : begin
|
||||
# Keep the semantics here synchronized with `ccmp` feature
|
||||
# Handle dotless
|
||||
local hasMarkAbove false
|
||||
foreach p [items-of parts] : if [isAboveMark p] : set hasMarkAbove true
|
||||
|
@ -44,29 +50,15 @@ glyph-block AutoBuild-Accents : begin
|
|||
if parts.0.baseAnchors.trailing : parts.forEach ogonekBelowToTR
|
||||
|
||||
# composite greek Marks
|
||||
for [local j 0] (j < parts.length) [inc j] : piecewise
|
||||
(parts.(j) === [query-glyph 'commaAbove']) : begin
|
||||
piecewise
|
||||
(parts.(j + 1) === [query-glyph 'graveAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'psilivaria']
|
||||
(parts.(j + 1) === [query-glyph 'acuteAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'psilioxia']
|
||||
(parts.(j + 1) === [query-glyph 'perispomeniAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'psiliperispomeni']
|
||||
(parts.(j + 1) === [query-glyph 'cyrlPokrytieAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'commaCyrlPorkytieAbove']
|
||||
(parts.(j) === [query-glyph 'revCommaAbove']) : begin
|
||||
piecewise
|
||||
(parts.(j + 1) === [query-glyph 'graveAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'dasiavaria']
|
||||
(parts.(j + 1) === [query-glyph 'acuteAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'dasiaoxia']
|
||||
(parts.(j + 1) === [query-glyph 'perispomeniAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'dasiaperispomeni']
|
||||
(parts.(j) === [query-glyph 'cyrlPsiliAbove']) : begin
|
||||
piecewise
|
||||
(parts.(j + 1) === [query-glyph 'cyrlPokrytieAbove']) : begin
|
||||
set parts.(j) null; set parts.(j + 1) [query-glyph 'cyrlPsiliPokrytieAbove']
|
||||
for [local j 0] (j < parts.length) [inc j] : begin
|
||||
foreach { gidFirst seconds } [Object.entries UnicodeKnowledge.markCompositionTf]
|
||||
if (parts.(j) === [query-glyph gidFirst])
|
||||
foreach { gidSecond gidTo } [Object.entries seconds]
|
||||
if (parts.(j + 1) === [query-glyph gidSecond]) : begin
|
||||
set parts.(j) [query-glyph gidTo]; set parts.(j + 1) null
|
||||
|
||||
if parts.0.baseAnchors.grekUpperTonos : grekUpperTonos parts.1 1 parts
|
||||
|
||||
return : parts.filter : function [x] [not : not x]
|
||||
|
||||
define [pad _s n] : begin
|
||||
|
|
|
@ -104,8 +104,8 @@ glyph-block Common-Derivatives : begin
|
|||
include : FlipAround x y
|
||||
set currentGlyph.autoRefPriority [query-glyph src].autoRefPriority
|
||||
|
||||
define [link-reduced-variant dstGid srcGid gr] : begin
|
||||
if [not : query-glyph dstGid] : select-variant dstGid (shapeFrom -- srcGid)
|
||||
define [link-reduced-variant] : params [dstGid srcGid gr follow] : begin
|
||||
if [not : query-glyph dstGid] : select-variant dstGid (shapeFrom -- srcGid) (follow -- [fallback follow dstGid])
|
||||
if (gr && [query-glyph srcGid]) : gr.set [query-glyph srcGid] dstGid
|
||||
|
||||
define [alias-reduced-variant dstGid srcGid shapeGid gr] : begin
|
||||
|
|
|
@ -8,6 +8,7 @@ glyph-module
|
|||
glyph-block Letter-Greek-Upper-Omega : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
|
||||
define [OmegaShape top extend sma smb] : glyph-proc
|
||||
local fine : Stroke * CThin
|
||||
|
@ -33,6 +34,7 @@ glyph-block Letter-Greek-Upper-Omega : begin
|
|||
|
||||
create-glyph 'grek/Omega' 0x3A9 : glyph-proc
|
||||
include : MarkSet.capital
|
||||
include : SetGrekUpperTonos 0
|
||||
include : OmegaShape CAP 0.08 SmoothA SmoothB
|
||||
|
||||
create-glyph 'latinomega' 0xAB65 : glyph-proc
|
||||
|
|
|
@ -10,7 +10,7 @@ glyph-block Letter-Latin-O : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Marks : HornBaseAnchor markHalfStroke
|
||||
glyph-block-import Letter-Shared : CreateAccentedComposition
|
||||
glyph-block-import Letter-Shared : CreateAccentedComposition SetGrekUpperTonos
|
||||
glyph-block-import Letter-Blackboard : BBS BBD
|
||||
|
||||
create-glyph 'O' 'O' : glyph-proc
|
||||
|
@ -45,7 +45,10 @@ glyph-block Letter-Latin-O : begin
|
|||
include : DotAt Middle (XH - df.mvs / 2 - O) rBroadOn
|
||||
set-base-anchor 'trailing' Middle 0
|
||||
|
||||
alias 'grek/Omicron' 0x39F 'O'
|
||||
create-glyph 'grek/Omicron' 0x39F : glyph-proc
|
||||
include [refer-glyph 'O'] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos 0
|
||||
|
||||
alias 'cyrl/O' 0x41E 'O'
|
||||
alias 'grek/omicron' 0x3BF 'o'
|
||||
alias 'cyrl/o' 0x43e 'o'
|
||||
|
|
|
@ -10,6 +10,7 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Marks : markHalfStroke
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
glyph-block-import Letter-Shared-Shapes : SerifFrame
|
||||
glyph-block-import Letter-Latin-V : VShapeOutline VShape
|
||||
glyph-block-export LambdaShape AMaskShape DeltaShape
|
||||
|
@ -45,10 +46,12 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
include : LeftwardTopSerif df.middle top [mix MidJutSide LongJut 0.5]
|
||||
|
||||
foreach { suffix { fStraightBar slabKind fBaseSlabs } } [Object.entries AConfig] : do
|
||||
define [AShapeImpl mak top] : glyph-proc
|
||||
define [AShapeImpl mak top fGrek] : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : df.markSet.(mak)
|
||||
set-base-anchor 'trailing' (df.rightSB - markHalfStroke) 0
|
||||
if fGrek : include : SetGrekUpperTonos
|
||||
[if (slabKind === SLAB-TOP || slabKind === SLAB-TRI) 0 0.2] * (df.rightSB - df.leftSB)
|
||||
include : VShape df top Stroke fStraightBar
|
||||
include : FlipAround Middle (top / 2)
|
||||
define yBar : ABarPosition fBaseSlabs top
|
||||
|
@ -56,13 +59,14 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
include : ASerifs df top fBaseSlabs slabKind
|
||||
|
||||
create-glyph "A.\(suffix)" : AShapeImpl "capital" CAP
|
||||
create-glyph "grek/Alpha.\(suffix)" : AShapeImpl "capital" CAP true
|
||||
create-glyph "smcpA.\(suffix)" : AShapeImpl "e" XH
|
||||
|
||||
select-variant 'A' 'A'
|
||||
link-reduced-variant 'A/sansSerif' 'A' MathSansSerif
|
||||
select-variant 'smcpA' 0x1D00 (follow -- 'A')
|
||||
alias 'grek/Alpha' 0x391 'A'
|
||||
alias-reduced-variant 'grek/Alpha/sansSerif' 'grek/Alpha' 'A/sansSerif' MathSansSerif
|
||||
select-variant 'grek/Alpha' 0x391 (follow -- 'A')
|
||||
link-reduced-variant 'grek/Alpha/sansSerif' 'grek/Alpha' MathSansSerif (follow -- 'A/sansSerif')
|
||||
alias 'cyrl/A' 0x410 'A'
|
||||
turned 'turnA' 0x2C6F 'A' Middle (CAP / 2)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ glyph-block Letter-Latin-Upper-E : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Marks : markHalfStroke
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink yMidBar EFVJutLength
|
||||
|
||||
define kSB 1
|
||||
|
@ -51,6 +52,10 @@ glyph-block Letter-Latin-Upper-E : begin
|
|||
include : EShape CAP (serifLT -- lt) (serifLB -- lb) (serifV -- v)
|
||||
set-base-anchor 'trailing' (RightSB - markHalfStroke) 0
|
||||
|
||||
create-glyph "grek/Epsilon.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "E.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos [if lt (-SideJut) 0]
|
||||
|
||||
create-glyph "smcpE.\(suffix)" : glyph-proc
|
||||
include : MarkSet.capital
|
||||
include : EShape XH (serifLT -- lt) (serifLB -- lb) (serifV -- v)
|
||||
|
@ -63,10 +68,10 @@ glyph-block Letter-Latin-Upper-E : begin
|
|||
|
||||
select-variant 'E' 'E'
|
||||
link-reduced-variant 'E/sansSerif' 'E' MathSansSerif
|
||||
select-variant 'smcpE' 0x1D07 (follow -- 'E')
|
||||
select-variant 'grek/Epsilon' 0x395 (follow -- 'E')
|
||||
link-reduced-variant 'grek/Epsilon/sansSerif' 'grek/Epsilon' MathSansSerif (follow -- 'E/sansSerif')
|
||||
|
||||
alias 'grek/Epsilon' 0x395 'E'
|
||||
alias-reduced-variant 'grek/Epsilon/sansSerif' 'grek/Epsilon' 'E/sansSerif' MathSansSerif
|
||||
select-variant 'smcpE' 0x1D07 (follow -- 'E')
|
||||
alias 'cyrl/Ie' 0x415 'E'
|
||||
|
||||
select-variant 'revE' 0x18E (follow -- 'E')
|
||||
|
|
|
@ -10,6 +10,7 @@ glyph-block Letter-Latin-Upper-H : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Blackboard : BBS BBD
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
glyph-block-import Letter-Shared-Shapes : SerifFrame RightwardTailedBar
|
||||
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender
|
||||
|
||||
|
@ -82,6 +83,10 @@ glyph-block Letter-Latin-Upper-H : begin
|
|||
include : Body SB RightSB CAP
|
||||
include : HSerifs slabType CAP 0 SB RightSB
|
||||
|
||||
create-glyph "grek/Eta.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "H.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos [if (slabType === SLAB-NONE) 0 (-SideJut)]
|
||||
|
||||
create-glyph "smcpH.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
include : Body SB RightSB XH
|
||||
|
@ -119,8 +124,8 @@ glyph-block Letter-Latin-Upper-H : begin
|
|||
|
||||
select-variant 'H' 'H'
|
||||
link-reduced-variant 'H/sansSerif' 'H' MathSansSerif
|
||||
alias 'grek/Eta' 0x397 'H'
|
||||
alias-reduced-variant 'grek/Eta/sansSerif' 'grek/Eta' 'H/sansSerif' MathSansSerif
|
||||
select-variant 'grek/Eta' 0x397 (follow -- 'H')
|
||||
link-reduced-variant 'grek/Eta/sansSerif' 'grek/Eta' MathSansSerif (follow -- 'H/sansSerif')
|
||||
alias 'cyrl/En' 0x41D 'H'
|
||||
select-variant 'halfH' 0x2C75
|
||||
|
||||
|
|
|
@ -9,44 +9,36 @@ glyph-module
|
|||
glyph-block Letter-Latin-Upper-I : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Shared : CreateAccentedComposition
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos CreateAccentedComposition
|
||||
|
||||
create-glyph 'I.straight' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : VBar df.middle 0 CAP
|
||||
set currentGlyph.autoRefPriority (-2)
|
||||
define [ISeriflessShape df top jut] : VBar df.middle 0 CAP
|
||||
|
||||
create-glyph 'I.serifless' : glyph-proc
|
||||
local df : DivFrame para.diversityII
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : VBar df.middle 0 CAP
|
||||
set currentGlyph.autoRefPriority (-2)
|
||||
|
||||
define [ISerifShape top jut] : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
define [ISerifShape df top jut] : glyph-proc
|
||||
include : VBar df.middle 0 top
|
||||
include : CenterBottomSerif df.middle 0 (jut * df.div)
|
||||
include : CenterTopSerif df.middle top (jut * df.div)
|
||||
|
||||
create-glyph 'I.serifed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : ISerifShape CAP LongJut
|
||||
define UpperIConfig : object
|
||||
'straight' { para.diversityI ISeriflessShape LongJut }
|
||||
'serifless' { para.diversityII ISeriflessShape LongJut }
|
||||
'serifed' { para.diversityI ISerifShape LongJut }
|
||||
'shortSerifed' { para.diversityI ISerifShape MidJutCenter }
|
||||
|
||||
create-glyph 'I.shortSerifed' : glyph-proc
|
||||
local df : DivFrame para.diversityI
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : ISerifShape CAP MidJutCenter
|
||||
foreach { suffix { div Body jut } } [Object.entries UpperIConfig] : do
|
||||
create-glyph "I.\(suffix)" : glyph-proc
|
||||
local df : DivFrame div
|
||||
set-width df.width
|
||||
include : df.markSet.capital
|
||||
include : Body df CAP jut
|
||||
|
||||
create-glyph "grek/Iota.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "I.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos 0
|
||||
|
||||
select-variant 'I' 'I'
|
||||
link-reduced-variant 'I/sansSerif' 'I' MathSansSerif
|
||||
alias 'grek/Iota' 0x399 'I'
|
||||
alias-reduced-variant 'grek/Iota/sansSerif' 'grek/Iota' 'I/sansSerif' MathSansSerif
|
||||
select-variant 'grek/Iota' 0x399 (follow -- 'I')
|
||||
link-reduced-variant 'grek/Iota/sansSerif' 'grek/Iota' MathSansSerif (follow -- 'I/sansSerif')
|
||||
alias 'cyrl/UkrainianI' 0x406 'I'
|
||||
alias 'cyrl/Palochka' 0x4C0 'I'
|
||||
|
||||
|
@ -54,7 +46,7 @@ glyph-block Letter-Latin-Upper-I : begin
|
|||
local df : DivFrame para.diversityI
|
||||
include : df.markSet.e
|
||||
set-width df.width
|
||||
include : ISerifShape XH MidJutCenter
|
||||
include : ISerifShape df XH MidJutCenter
|
||||
|
||||
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
|
||||
create-glyph 'mathbb/I' 0x1D540 : glyph-proc
|
||||
|
|
|
@ -9,6 +9,7 @@ glyph-module
|
|||
glyph-block Letter-Latin-Upper-P : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
glyph-block-import Letter-Shared-Metrics : BowlXDepth
|
||||
glyph-block-import Letter-Blackboard : BBS BBD
|
||||
glyph-block-export PShape PShapeOutline RevPShape PBarPosY PRotundaShape BBPShape
|
||||
|
@ -135,6 +136,10 @@ glyph-block Letter-Latin-Upper-P : begin
|
|||
PShape CAP (slab -- slabs)
|
||||
if fGap [PShape.OpenGap CAP] [glyph-proc]
|
||||
|
||||
create-glyph "grek/Rho.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "P.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos [if slabs (-SideJut) 0]
|
||||
|
||||
create-glyph "smcpP.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
include : difference
|
||||
|
@ -157,8 +162,8 @@ glyph-block Letter-Latin-Upper-P : begin
|
|||
select-variant 'smcpP' 0x1D18 (follow -- 'P')
|
||||
alias 'grek/smcpRho' 0x1D29 'smcpP'
|
||||
|
||||
alias 'grek/Rho' 0x3A1 'P'
|
||||
alias-reduced-variant 'grek/Rho/sansSerif' 'grek/Rho' 'P/sansSerif' MathSansSerif
|
||||
select-variant 'grek/Rho' 0x3A1 (follow -- 'P')
|
||||
link-reduced-variant 'grek/Rho/sansSerif' 'grek/Rho' MathSansSerif (follow -- 'P/sansSerif')
|
||||
alias 'cyrl/Er' 0x420 'P'
|
||||
|
||||
select-variant 'currency/rubleSign' 0x20BD
|
||||
|
|
|
@ -10,6 +10,7 @@ glyph-block Letter-Latin-Upper-Y : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Latin-X : HalfXStrand
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos
|
||||
glyph-block-import Letter-Shared-Shapes : SerifFrame WithAIHSerifsMask
|
||||
|
||||
define BODY-CURLY 0
|
||||
|
@ -70,6 +71,11 @@ glyph-block Letter-Latin-Upper-Y : begin
|
|||
include : MarkSet.capital
|
||||
include : YShape bodyType slabType CAP
|
||||
|
||||
create-glyph "grek/Upsilon.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "Y.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : SetGrekUpperTonos
|
||||
if (slabType === SLAB-NONE || slabType === SLAB-BASE) OX (OX - SideJut)
|
||||
|
||||
create-glyph "smcpY.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
include : YShape bodyType slabType XH
|
||||
|
@ -89,8 +95,8 @@ glyph-block Letter-Latin-Upper-Y : begin
|
|||
select-variant 'cyrl/ue' 0x4AF (follow -- 'Y')
|
||||
turned 'turnSansSerifY' 0x2144 'Y/sansSerif' Middle (CAP / 2)
|
||||
|
||||
alias 'grek/Upsilon' 0x3A5 'Y'
|
||||
alias-reduced-variant 'grek/Upsilon/sansSerif' 'grek/Upsilon' 'Y/sansSerif' MathSansSerif
|
||||
select-variant 'grek/Upsilon' 0x3A5 (follow -- 'Y')
|
||||
link-reduced-variant 'grek/Upsilon/sansSerif' 'grek/Upsilon' MathSansSerif (follow -- 'Y/sansSerif')
|
||||
alias 'cyrl/Ue' 0x4AE 'Y'
|
||||
derive-glyphs 'currency/yenSign' 0xA5 'Y' : lambda [src sel] : glyph-proc
|
||||
include [refer-glyph src] AS_BASE ALSO_METRICS
|
||||
|
|
|
@ -45,6 +45,10 @@ glyph-block Letter-Shared : begin
|
|||
WithTransform [Translate dx 0] [refer-glyph gidPart2]
|
||||
CvDecompose.set currentGlyph { gidPart1U gidPart2 }
|
||||
|
||||
glyph-block-export SetGrekUpperTonos
|
||||
define [SetGrekUpperTonos kern] : glyph-proc
|
||||
set-base-anchor 'grekUpperTonos' kern (CAP - 0.75 * Accent)
|
||||
|
||||
|
||||
glyph-block Letter-Blackboard : begin
|
||||
glyph-block-import CommonShapes
|
||||
|
|
|
@ -474,6 +474,11 @@ glyph-block Marks : begin
|
|||
g4 [mix markMiddle (markMiddle - radius) 0.2] (aboveMarkBot - radius - commaOvershoot2)
|
||||
include : ApparentTranslate 0 (DotRadius * 0.3)
|
||||
|
||||
create-glyph 'commaGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'commaAbove'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'turnCommaAbove' 0x312 : glyph-proc
|
||||
set-width 0
|
||||
currentGlyph.shortName = 'turnComma'
|
||||
|
@ -497,6 +502,11 @@ glyph-block Marks : begin
|
|||
g4 [mix markMiddle (markMiddle + radius) 0.2] (aboveMarkBot - radius - commaOvershoot2)
|
||||
include : ApparentTranslate 0 (DotRadius * 0.3)
|
||||
|
||||
create-glyph 'revCommaGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'revCommaAbove'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'barAbove' 0x30D : glyph-proc
|
||||
set-width 0
|
||||
set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkTop
|
||||
|
@ -567,6 +577,11 @@ glyph-block Marks : begin
|
|||
flat (markMiddle + markStress) (aboveMarkBot - markFine * 0.5) [widths markFine markFine]
|
||||
curl (markMiddle - markExtend * 0.5) (aboveMarkTop + markStress * 0.25) [widths markStress markStress]
|
||||
|
||||
create-glyph 'variaGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'variaAbove'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'oxiaAbove' 0x341 : glyph-proc
|
||||
set-width 0
|
||||
set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkTop
|
||||
|
@ -576,6 +591,11 @@ glyph-block Marks : begin
|
|||
flat (markMiddle - markStress) (aboveMarkBot - markFine * 0.5) [widths markFine markFine]
|
||||
curl (markMiddle + markExtend * 0.5) (aboveMarkTop + markStress * 0.25) [widths markStress markStress]
|
||||
|
||||
create-glyph 'oxiaGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'oxiaAbove'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'perispomeniAbove' 0x342 : glyph-proc
|
||||
set-width 0
|
||||
currentGlyph.shortName = 'perisp'
|
||||
|
@ -1390,9 +1410,9 @@ glyph-block Marks : begin
|
|||
hs -- markHalfStroke
|
||||
|
||||
define [GreekLRDoubleMark id unicode leftGlyph rightGlyph] : begin
|
||||
local k : -Width * 0.15
|
||||
create-glyph id : glyph-proc
|
||||
set-width 0
|
||||
local k : -Width * 0.15
|
||||
|
||||
include leftGlyph
|
||||
include : Translate (2 * k) 0
|
||||
|
@ -1402,19 +1422,24 @@ glyph-block Marks : begin
|
|||
set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkTop
|
||||
set currentGlyph.autoRefPriority 50
|
||||
|
||||
create-glyph ('spaced' + id) unicode : glyph-proc
|
||||
create-glyph "\(id)GrekUpperTonos" : glyph-proc
|
||||
set-width 0
|
||||
include [refer-glyph id]
|
||||
set-mark-anchor 'grekUpperTonos' (markMiddle - k) XH
|
||||
|
||||
if unicode : create-glyph ('spaced' + id) unicode : glyph-proc
|
||||
include [refer-glyph 'markBaseSpace'] AS_BASE
|
||||
set-width [query-glyph 'markBaseSpace'].advanceWidth
|
||||
include [refer-glyph id]
|
||||
|
||||
GreekLRDoubleMark 'psilivaria' 0x1FCD [refer-glyph 'commaAbove'] [refer-glyph 'variaAbove']
|
||||
GreekLRDoubleMark 'psilioxia' 0x1FCE [refer-glyph 'commaAbove'] [refer-glyph 'oxiaAbove']
|
||||
GreekLRDoubleMark 'dasiavaria' 0x1FDD [refer-glyph 'revCommaAbove'] [refer-glyph 'variaAbove']
|
||||
GreekLRDoubleMark 'dasiaoxia' 0x1FDE [refer-glyph 'revCommaAbove'] [refer-glyph 'oxiaAbove']
|
||||
GreekLRDoubleMark 'psiliVaria' 0x1FCD [refer-glyph 'commaAbove'] [refer-glyph 'variaAbove']
|
||||
GreekLRDoubleMark 'psiliOxia' 0x1FCE [refer-glyph 'commaAbove'] [refer-glyph 'oxiaAbove']
|
||||
GreekLRDoubleMark 'dasiaVaria' 0x1FDD [refer-glyph 'revCommaAbove'] [refer-glyph 'variaAbove']
|
||||
GreekLRDoubleMark 'dasiaOxia' 0x1FDE [refer-glyph 'revCommaAbove'] [refer-glyph 'oxiaAbove']
|
||||
|
||||
local yc : aboveMarkTop - commaAboveRadius + DotRadius * 0.3 + commaOvershoot
|
||||
|
||||
create-glyph 'psiliperispomeni' : glyph-proc
|
||||
create-glyph 'psiliPerispomeni' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph "commaAbove"
|
||||
local radius : Math.max (markExtend - commaAboveRadius) (commaAboveRadius * 1.25)
|
||||
|
@ -1428,6 +1453,35 @@ glyph-block Marks : begin
|
|||
set-mark-anchor 'above' markMiddle XH markMiddle (aboveMarkTop + markHalfStroke * 2)
|
||||
set currentGlyph.autoRefPriority 50
|
||||
|
||||
create-glyph 'psiliPerispomeniGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'psiliPerispomeni'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'spaced_psiliPerispomeni' 0x1FCF : glyph-proc
|
||||
include [refer-glyph 'markBaseSpace'] AS_BASE
|
||||
set-width [query-glyph 'markBaseSpace'].advanceWidth
|
||||
include : refer-glyph "psiliPerispomeni"
|
||||
|
||||
create-glyph 'dasiaPerispomeni' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph "revCommaAbove"
|
||||
local radius : Math.max (markExtend - commaAboveRadius) (commaAboveRadius * 1.25)
|
||||
include : dispiro
|
||||
widths.lhs : Math.min (markHalfStroke * 2) ([AdviceStroke 6.5] * 1.25)
|
||||
g4.up.start (markMiddle - radius) yc [heading Upward]
|
||||
arcvh
|
||||
g4.right.mid markMiddle (yc + radius)
|
||||
archv
|
||||
g4.down.end (markMiddle + radius) yc [heading Downward]
|
||||
set-mark-anchor 'above' markMiddle XH markMiddle (aboveMarkTop + markHalfStroke * 2)
|
||||
set currentGlyph.autoRefPriority 50
|
||||
|
||||
create-glyph 'dasiaPerispomeniGrekUpperTonos' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph 'dasiaPerispomeni'
|
||||
set-mark-anchor 'grekUpperTonos' markMiddle XH
|
||||
|
||||
create-glyph 'cyrlPsiliPokrytieAbove' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph "commaAbove"
|
||||
|
@ -1443,29 +1497,10 @@ glyph-block Marks : begin
|
|||
set-mark-anchor 'above' markMiddle XH markMiddle (aboveMarkTop + markHalfStroke * 2)
|
||||
set currentGlyph.autoRefPriority 50
|
||||
|
||||
create-glyph 'spaced_psiliperispomeni' 0x1FCF : glyph-proc
|
||||
create-glyph 'spaced_dasiaPerispomeni' 0x1FDF : glyph-proc
|
||||
include [refer-glyph 'markBaseSpace'] AS_BASE
|
||||
set-width [query-glyph 'markBaseSpace'].advanceWidth
|
||||
include : refer-glyph "psiliperispomeni"
|
||||
|
||||
create-glyph 'dasiaperispomeni' : glyph-proc
|
||||
set-width 0
|
||||
include : refer-glyph "revCommaAbove"
|
||||
local radius : Math.max (markExtend - commaAboveRadius) (commaAboveRadius * 1.25)
|
||||
include : dispiro
|
||||
widths.lhs : Math.min (markHalfStroke * 2) ([AdviceStroke 6.5] * 1.25)
|
||||
g4.up.start (markMiddle - radius) yc [heading Upward]
|
||||
arcvh
|
||||
g4.right.mid markMiddle (yc + radius)
|
||||
archv
|
||||
g4.down.end (markMiddle + radius) yc [heading Downward]
|
||||
set-mark-anchor 'above' markMiddle XH markMiddle (aboveMarkTop + markHalfStroke * 2)
|
||||
set currentGlyph.autoRefPriority 50
|
||||
|
||||
create-glyph 'spaced_dasiaperispomeni' 0x1FDF : glyph-proc
|
||||
include [refer-glyph 'markBaseSpace'] AS_BASE
|
||||
set-width [query-glyph 'markBaseSpace'].advanceWidth
|
||||
include : refer-glyph "dasiaperispomeni"
|
||||
include : refer-glyph "dasiaPerispomeni"
|
||||
|
||||
if [not recursive] : begin
|
||||
define AnchorMap : list
|
||||
|
|
32
font-src/meta/unicode-knowledge.ptl
Normal file
32
font-src/meta/unicode-knowledge.ptl
Normal file
|
@ -0,0 +1,32 @@
|
|||
export : define iotaBelowToLfTf : object
|
||||
'iotaBelow' 'iotaLF'
|
||||
|
||||
export : define ogonekBelowToTRTf : object
|
||||
'ogonekBelow' 'ogonekTR'
|
||||
|
||||
export : define upperGrekMarkToTonosTf : object
|
||||
'variaAbove' 'variaGrekUpperTonos'
|
||||
'oxiaAbove' 'oxiaGrekUpperTonos'
|
||||
'graveAbove' 'variaGrekUpperTonos'
|
||||
'acuteAbove' 'oxiaGrekUpperTonos'
|
||||
'commaAbove' 'commaGrekUpperTonos'
|
||||
'revCommaAbove' 'revCommaGrekUpperTonos'
|
||||
'psiliVaria' 'psiliVariaGrekUpperTonos'
|
||||
'psiliOxia' 'psiliOxiaGrekUpperTonos'
|
||||
'dasiaVaria' 'dasiaVariaGrekUpperTonos'
|
||||
'dasiaOxia' 'dasiaOxiaGrekUpperTonos'
|
||||
'psiliPerispomeni' 'psiliPerispomeniGrekUpperTonos'
|
||||
'dasiaPerispomeni' 'dasiaPerispomeniGrekUpperTonos'
|
||||
|
||||
export : define markCompositionTf : object
|
||||
'commaAbove' : object
|
||||
'graveAbove' 'psiliVaria'
|
||||
'acuteAbove' 'psiliOxia'
|
||||
'perispomeniAbove' 'psiliPerispomeni'
|
||||
'cyrlPokrytieAbove' 'commaCyrlPorkytieAbove'
|
||||
'revCommaAbove' : object
|
||||
'graveAbove' 'dasiaVaria'
|
||||
'acuteAbove' 'dasiaOxia'
|
||||
'perispomeniAbove' 'dasiaPerispomeni'
|
||||
'cyrlPsiliAbove' : object
|
||||
'cyrlPokrytieAbove' 'cyrlPsiliPokrytieAbove'
|
|
@ -3,8 +3,8 @@ extern Set
|
|||
|
||||
define MarkClasses {
|
||||
'above' 'below' 'overlay' 'slash' 'topright' 'bottomright'
|
||||
'trailing' 'lf' 'tieAbove' 'tieBelow' 'aboveBrace' 'belowBrace' 'cvDecompose'
|
||||
'enclosureInner' 'enclosureInnerFirstHalf' 'enclosureInnerSecondHalf'
|
||||
'trailing' 'lf' 'tieAbove' 'tieBelow' 'aboveBrace' 'belowBrace' 'grekUpperTonos'
|
||||
'cvDecompose' 'enclosureInner' 'enclosureInnerFirstHalf' 'enclosureInnerSecondHalf'
|
||||
}
|
||||
|
||||
export : define [buildMarkMkmk sink glyphStore] : begin
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import [add-common-feature add-feature add-lookup add-feature-lookup ChainRuleBuilder BeginLookupBlock EndLookupBlock] from "./table-util"
|
||||
import [add-common-feature add-feature add-lookup add-feature-lookup ChainRuleBuilder BeginLookupBlock EndLookupBlock UkMapToLookup UkMap2ToLookup] from "./table-util"
|
||||
import [AnyCv Dotless TieMark TieGlyph CcmpDecompose] from "../support/gr"
|
||||
import "../meta/unicode-knowledge" as UnicodeKnowledge
|
||||
|
||||
extern Set
|
||||
|
||||
define-operator "~>" 880 'right' : syntax-rules
|
||||
|
@ -11,17 +13,19 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
define ccmp : add-feature sink 'ccmp'
|
||||
define {chain-rule} : ChainRuleBuilder sink
|
||||
|
||||
define groupTR {}
|
||||
define groupLF {}
|
||||
define dotlessFrom {}
|
||||
define dotlessTo {}
|
||||
define TieMarkFrom {}
|
||||
define TieMarkTo {}
|
||||
define TieGlyphs {}
|
||||
define groupGrekUpperTonos {}
|
||||
define groupTR {}
|
||||
define groupLF {}
|
||||
define dotlessFrom {}
|
||||
define dotlessTo {}
|
||||
define TieMarkFrom {}
|
||||
define TieMarkTo {}
|
||||
define TieGlyphs {}
|
||||
|
||||
foreach { gid g } [glyphStore.namedEntries] : if (gid.(0) !== "."): begin
|
||||
if g.baseAnchors.trailing : groupTR.push gid
|
||||
if g.baseAnchors.lf : groupLF.push gid
|
||||
if g.baseAnchors.trailing : groupTR.push gid
|
||||
if g.baseAnchors.lf : groupLF.push gid
|
||||
if g.baseAnchors.grekUpperTonos : groupGrekUpperTonos.push gid
|
||||
if [Dotless.get g] : begin
|
||||
dotlessFrom.push gid
|
||||
dotlessTo.push [Dotless.get g]
|
||||
|
@ -30,8 +34,9 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
TieMarkFrom.push gid
|
||||
TieMarkTo.push [TieMark.get g]
|
||||
|
||||
define [IotaLF] : {'iotaBelow'} ~> {'iotaLF'}
|
||||
define [OgonekTrailing] : {'ogonekBelow'} ~> {'ogonekTR'}
|
||||
define [IotaLF] : UkMapToLookup UnicodeKnowledge.iotaBelowToLfTf
|
||||
define [OgonekTrailing] : UkMapToLookup UnicodeKnowledge.ogonekBelowToTRTf
|
||||
define [GrekUpperTonosTf] : UkMapToLookup UnicodeKnowledge.upperGrekMarkToTonosTf
|
||||
|
||||
define [ToneToToneStart toneEnd] : begin
|
||||
local f {}
|
||||
|
@ -97,7 +102,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
e.push ('toneSandhiMid' + toneStart + toneMid + toneEnd)
|
||||
return (f ~> e)
|
||||
|
||||
define lookupCcmp1 : add-lookup sink : object
|
||||
define lookupMarks1 : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
# Dot removal (max 6 middle marks are supported)
|
||||
|
@ -126,17 +131,14 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule groupTR markGlyphs.all markGlyphs.all markGlyphs.all markGlyphs.all markGlyphs.all [OgonekTrailing]
|
||||
chain-rule groupTR markGlyphs.all markGlyphs.all markGlyphs.all markGlyphs.all markGlyphs.all markGlyphs.all [OgonekTrailing]
|
||||
|
||||
define lookupCcmp2 : add-lookup sink : object
|
||||
define lookupMarks2 : add-lookup sink : object
|
||||
.type 'gsub_ligature'
|
||||
.substitutions : list
|
||||
object [from {'commaAbove' 'graveAbove'}] [to 'psilivaria']
|
||||
object [from {'commaAbove' 'acuteAbove'}] [to 'psilioxia']
|
||||
object [from {'commaAbove' 'perispomeniAbove'}] [to 'psiliperispomeni']
|
||||
object [from {'commaAbove' 'cyrlPokrytieAbove'}] [to 'commaCyrlPorkytieAbove']
|
||||
object [from {'revCommaAbove' 'graveAbove'}] [to 'dasiavaria']
|
||||
object [from {'revCommaAbove' 'acuteAbove'}] [to 'dasiaoxia']
|
||||
object [from {'revCommaAbove' 'perispomeniAbove'}] [to 'dasiaperispomeni']
|
||||
object [from {'cyrlPsiliAbove' 'cyrlPokrytieAbove'}] [to 'cyrlPsiliPokrytieAbove']
|
||||
.substitutions : UkMap2ToLookup UnicodeKnowledge.markCompositionTf
|
||||
|
||||
define lookupMarks3 : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule groupGrekUpperTonos [GrekUpperTonosTf]
|
||||
|
||||
define lookupCcmp-TieMarkLigature : add-lookup sink : object
|
||||
.type 'gsub_ligature'
|
||||
|
@ -144,7 +146,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
TieMarkFrom.map : lambda [gnFrom idx]
|
||||
object [from {'cgj' gnFrom}] [to TieMarkTo.(idx)]
|
||||
|
||||
define lookupCcmp-TieMarkContextual : add-lookup sink : object
|
||||
define lookupTieMarkContextual : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list : object
|
||||
match {[TieGlyphs.concat TieMarkTo] {'cgj'} TieMarkFrom}
|
||||
|
@ -152,7 +154,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
inputEnds 3
|
||||
apply {{.at 1 .lookup lookupCcmp-TieMarkLigature}}
|
||||
|
||||
define lookupCcmp-ToneStart : add-lookup sink : object
|
||||
define lookupToneStart : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneToToneStart 0] {'tone0'}
|
||||
|
@ -161,7 +163,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneToToneStart 3] {'tone3'}
|
||||
chain-rule [ToneToToneStart 4] {'tone4'}
|
||||
|
||||
define lookupCcmp-ToneMid : add-lookup sink : object
|
||||
define lookupToneMid : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneStartOrMidAt 0] [ToneStartToToneMid 0]
|
||||
|
@ -170,7 +172,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneStartOrMidAt 3] [ToneStartToToneMid 3]
|
||||
chain-rule [ToneStartOrMidAt 4] [ToneStartToToneMid 4]
|
||||
|
||||
define lookupCcmp-ToneEnd : add-lookup sink : object
|
||||
define lookupToneEnd : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneStartOrMidAt 0] [ToneToToneEnd 0]
|
||||
|
@ -179,7 +181,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneStartOrMidAt 3] [ToneToToneEnd 3]
|
||||
chain-rule [ToneStartOrMidAt 4] [ToneToToneEnd 4]
|
||||
|
||||
define lookupCcmp-ToneSandhiStart : add-lookup sink : object
|
||||
define lookupToneSandhiStart : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneSandhiToToneStart 0] {'toneSandhi0'}
|
||||
|
@ -188,7 +190,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneSandhiToToneStart 3] {'toneSandhi3'}
|
||||
chain-rule [ToneSandhiToToneStart 4] {'toneSandhi4'}
|
||||
|
||||
define lookupCcmp-ToneSandhiMid : add-lookup sink : object
|
||||
define lookupToneSandhiMid : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneSandhiStartOrMidAt 0] [ToneSandhiStartToToneMid 0]
|
||||
|
@ -197,7 +199,7 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneSandhiStartOrMidAt 3] [ToneSandhiStartToToneMid 3]
|
||||
chain-rule [ToneSandhiStartOrMidAt 4] [ToneSandhiStartToToneMid 4]
|
||||
|
||||
define lookupCcmp-ToneSandhiEnd : add-lookup sink : object
|
||||
define lookupToneSandhiEnd : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.rules : list
|
||||
chain-rule [ToneSandhiStartOrMidAt 0] [ToneSandhiToToneEnd 0]
|
||||
|
@ -207,13 +209,16 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
chain-rule [ToneSandhiStartOrMidAt 4] [ToneSandhiToToneEnd 4]
|
||||
|
||||
|
||||
ccmp.lookups.push lookupCcmp1 lookupCcmp2 lookupCcmp-TieMarkContextual
|
||||
ccmp.lookups.push lookupCcmp-ToneStart lookupCcmp-ToneMid lookupCcmp-ToneEnd
|
||||
sink.lookupDep.push {lookupCcmp-ToneStart lookupCcmp-ToneMid}
|
||||
sink.lookupDep.push {lookupCcmp-ToneMid lookupCcmp-ToneEnd}
|
||||
ccmp.lookups.push lookupCcmp-ToneSandhiStart lookupCcmp-ToneSandhiMid lookupCcmp-ToneSandhiEnd
|
||||
sink.lookupDep.push {lookupCcmp-ToneSandhiStart lookupCcmp-ToneSandhiMid}
|
||||
sink.lookupDep.push {lookupCcmp-ToneSandhiMid lookupCcmp-ToneSandhiEnd}
|
||||
ccmp.lookups.push lookupMarks1 lookupMarks2 lookupMarks3 lookupTieMarkContextual
|
||||
sink.lookupDep.push {lookupMarks1 lookupMarks2}
|
||||
sink.lookupDep.push {lookupMarks2 lookupMarks3}
|
||||
sink.lookupDep.push {lookupMarks3 lookupTieMarkContextual}
|
||||
ccmp.lookups.push lookupToneStart lookupToneMid lookupToneEnd
|
||||
sink.lookupDep.push {lookupToneStart lookupToneMid}
|
||||
sink.lookupDep.push {lookupToneMid lookupToneEnd}
|
||||
ccmp.lookups.push lookupToneSandhiStart lookupToneSandhiMid lookupToneSandhiEnd
|
||||
sink.lookupDep.push {lookupToneSandhiStart lookupToneSandhiMid}
|
||||
sink.lookupDep.push {lookupToneSandhiMid lookupToneSandhiEnd}
|
||||
|
||||
# CCMP decomposition
|
||||
define decompositions {.}
|
||||
|
|
|
@ -184,3 +184,17 @@ export : define [finalizeTable table] : begin
|
|||
set table.lookupOrder : toposort table.lookupDep
|
||||
foreach [{key lang} : pairs-of table.languages] : begin
|
||||
if lang.features : lang.features.sort
|
||||
|
||||
export : define [UkMapToLookup m] : begin
|
||||
local l {}
|
||||
local r {}
|
||||
foreach { k v } [Object.entries m] : begin
|
||||
l.push k
|
||||
r.push v
|
||||
return { .left l .right r }
|
||||
|
||||
export : define [UkMap2ToLookup mm] : begin
|
||||
local res {}
|
||||
foreach { g1 second } [Object.entries mm] : foreach { g2 gTo } [Object.entries second] : begin
|
||||
res.push {.from {g1 g2} .to gTo}
|
||||
return res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue