Skip to content

Commit

Permalink
Add all remaining Frakturs
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Aug 3, 2024
1 parent e7b84c1 commit bf15291
Show file tree
Hide file tree
Showing 31 changed files with 652 additions and 164 deletions.
5 changes: 2 additions & 3 deletions changes/31.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
- MOON LANDER (`U+1CDF5`) (Proposed for Unicode 16; L2/21-235).
- UP-POINTING FROG (`U+1CDFB`) (Proposed for Unicode 16; L2/21-235).
- DOWN-POINTING FROG (`U+1CDFC`) (Proposed for Unicode 16; L2/21-235).
- MATHEMATICAL FRAKTUR CAPITAL A (`U+1D504`) .. MATHEMATICAL FRAKTUR CAPITAL Y (`U+1D51C`) (#444).
- MATHEMATICAL FRAKTUR SMALL E (`U+1D522`) (#444).
- MATHEMATICAL FRAKTUR SMALL O (`U+1D52C`) (#444).
- MATHEMATICAL FRAKTUR CAPITAL A (`U+1D504`) .. MATHEMATICAL FRAKTUR SMALL Z (`U+1D537`) (#444).
- MATHEMATICAL BOLD FRAKTUR CAPITAL A (`U+1D56C`) .. MATHEMATICAL BOLD FRAKTUR SMALL Z (`U+1D59F`) (#444).
* Add separate variant selectors for Cyrillic Capital En/Er (`VXAA`, `VXAB`).
* Add variant selectors for Greek lower Beta/Gamma/Nu/Upsilon (`VXAC`, `VXAD`, `VXAE`, `VXAF`).
* Optimize glyph for VERTICAL LINE WITH MIDDLE DOT (`U+2327`).
Expand Down
9 changes: 9 additions & 0 deletions packages/font-glyphs/src/auto-build/transformed.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ glyph-block Autobuild-Transformed-Mathematical : begin
CreateMathDerivatives groupName tfm gr base letters overrides
CreateMathAliasableImpl groupName altGroupName tfm gr base letters overrides

define [CreateMathBoldFraktur base letters] : begin
local jobs {}
foreach j [range 0 letters.length] : jobs.push { (base + j) ("frak/" + letters.(j)) }
createMathDerivedSeriesImpl 'frakbf' tfBold jobs

# Math bold
CreateMathDerivatives 'mathbf' tfBold null 0x1D400 UpperLatin
CreateMathDerivatives 'mathbf' tfBold null 0x1D41A LowerLatin
Expand Down Expand Up @@ -897,6 +902,10 @@ glyph-block Autobuild-Transformed-Mathematical : begin
CreateMathDerivatives 'legacyComputingOutlined' tfBold null 0x1CCD6 UpperLatin null TfOutline
CreateMathDerivatives 'legacyComputingOutlined' tfBold null 0x1CCF0 Digits null TfOutline

# Math fraktur
CreateMathBoldFraktur 0x1D56C UpperLatin
CreateMathBoldFraktur 0x1D586 LowerLatin

glyph-block Autobuild-Rhotic : begin
glyph-block-import Mark-Shared-Metrics : markFine markstroke
glyph-block-import CommonShapes
Expand Down
12 changes: 10 additions & 2 deletions packages/font-glyphs/src/letter-like/fraktur.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ export : define [apply] : begin
run-glyph-module "./fraktur/upper-s.mjs"
run-glyph-module "./fraktur/upper-z.mjs"

run-glyph-module "./fraktur/lower-e.mjs"
run-glyph-module "./fraktur/lower-o.mjs"
run-glyph-module "./fraktur/lower-agq.mjs"
run-glyph-module "./fraktur/lower-bopvw.mjs"
run-glyph-module "./fraktur/lower-ce.mjs"
run-glyph-module "./fraktur/lower-d.mjs"
run-glyph-module "./fraktur/lower-fkrt.mjs"
run-glyph-module "./fraktur/lower-hy.mjs"
run-glyph-module "./fraktur/lower-ijl.mjs"
run-glyph-module "./fraktur/lower-mnu.mjs"
run-glyph-module "./fraktur/lower-s.mjs"
run-glyph-module "./fraktur/lower-z.mjs"

run-glyph-module "./fraktur/x.mjs"
42 changes: 31 additions & 11 deletions packages/font-glyphs/src/letter-like/fraktur/common.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,6 @@ glyph-block LetterLike-Fraktur-Common : begin
define frakThick : 1.0 * Stroke
define frakFine : 1.0 * [AdviceStroke 4] # For decoration

class MaskingProfile
public [new dx dy] : begin
this.fixed = true
this.dx = dx
this.dy = dy
public [getPenShape gizmo] : begin
local tf : gizmo.applyOffsetXY this.dx this.dy
list [new Vec2 0 0] [new Vec2 tf.x tf.y]

glyph-block-export S
define S : new FrakturPen frakThick (0.875 * frakThin)

Expand All @@ -126,6 +117,15 @@ glyph-block LetterLike-Fraktur-Common : begin
glyph-block-export T
define T : new FrakturPen frakThin (0.875 * frakThin)

class MaskingProfile
public [new dx dy] : begin
this.fixed = true
this.dx = dx
this.dy = dy
public [getPenShape gizmo] : begin
local tf : gizmo.applyOffsetXY this.dx this.dy
list [new Vec2 0 0] [new Vec2 tf.x tf.y]

glyph-block-export CutMaskLeft
define CutMaskLeft : new MaskingProfile (-VERY-FAR) 0

Expand Down Expand Up @@ -182,5 +182,25 @@ glyph-block LetterLike-Fraktur-Common : begin
glyph-block-export PHexBot
define PHexBot : 1 - PHexTop

glyph-block-export FrakDf
define [FrakDf div m] : DivFrame [fallback div 1] [fallback m 2] [Math.max 1 : DecoSizeX / SB]
glyph-block-export UpperDf
define [UpperDf div m] : DivFrame [fallback div 1] [fallback m 2] [Math.max 1 : DecoSizeX / SB]

glyph-block-export LowerDf
define [LowerDf div m] : DivFrame [fallback div 1] [fallback m 2] [Math.max 1 : (1.75 * DecoSizeX - 0.5 * S.thick) / SB]

glyph-block-export RBDecoration
define [RBDecoration cx cy limy] : list
curl cx [min@ [fallback limy VERY-FAR] [post@slope : 2 * SlopeB]]
[flatc.sr SlopeB].end (pre@ <+> 0.5 * DecoSizeX) cy
corner (pre@ <+> DecoSizeX) (pre@ <+> DecoSizeY)

glyph-block-export LTDecoration
define [LTDecoration cx cy limy] : list
corner (post@ <-> DecoSizeX) (post@ <-> DecoSizeY)
[ccurl.sr SlopeB].start (post@ <-> 0.5 * DecoSizeX) cy
flat cx [max@ [fallback limy (-VERY-FAR)] [pre@slope : 2 * SlopeB]]

set [LTDecoration.g2 cx cy limy] : list
corner (post@ <-> DecoSizeX) (post@ <-> DecoSizeY)
[ccurl.sr SlopeB].start (post@ <-> 0.5 * DecoSizeX) cy
g2 cx [max@ [fallback limy (-VERY-FAR)] [pre@slope : 2 * SlopeB]]
56 changes: 56 additions & 0 deletions packages/font-glyphs/src/letter-like/fraktur/lower-agq.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$$include '../../meta/macros.ptl'

glyph-module

glyph-block LetterLike-Fraktur-Lower-AQ : begin
glyph-block-import Common-Derivatives
glyph-block-import CommonShapes
glyph-block-import LetterLike-Fraktur-Common : LowerDf S F T fraktur-stroke change-pen
glyph-block-import LetterLike-Fraktur-Common : DecoSizeX DecoSizeY SlopeA SlopeB
glyph-block-import LetterLike-Fraktur-Common : Wave PHexTop PHexBot RBDecoration

define [LeftHalfShape mode box] : fraktur-stroke S
corner box.right [post@slope SlopeB]
corner [box.xp PHexTop] box.top
g2.down.mid (box.left - OX) [mix@ 0.5]
corner [box.xp PHexBot] box.bot
corner box.right [pre@slope SlopeA]

create-glyph "frak/a" 0x1D51E : glyph-proc
local df : include : LowerDf 1
include : df.markSet.e

local aBox : S.box XH 0 df.leftSB df.rightSB

local leftStroke : include : LeftHalfShape 'a' aBox
local rightStroke : include : fraktur-stroke S
flat [leftStroke.first].x [leftStroke.first].y
RBDecoration [leftStroke.last].x aBox.bot [leftStroke.last].y

create-glyph "frak/g" 0x1D524 : glyph-proc
local df : include : LowerDf 1
include : df.markSet.p

local aBox : S.box XH 0 df.leftSB df.rightSB
local gBox : S.box XH Descender df.leftSB df.rightSB

local leftStroke : include : LeftHalfShape 'p' aBox
local rightStroke : include : fraktur-stroke S
corner [leftStroke.first].x [leftStroke.first].y
corner pre@ [leftStroke.last].y
g2 (pre@ <+> 0.5 * DecoSizeX) (post@ <+> SmallArchDepthA)
hookend (sw -- S.thick) gBox.bot
g4 gBox.left (pre@ <+> SHook)


create-glyph "frak/q" 0x1D52E : glyph-proc
local df : include : LowerDf 1
include : df.markSet.p

local aBox : S.box XH 0 df.leftSB df.rightSB
local qBox : S.box XH Descender df.leftSB df.rightSB

local leftStroke : include : LeftHalfShape 'p' aBox
local rightStroke : include : fraktur-stroke S
flat [leftStroke.first].x [leftStroke.first].y
RBDecoration [leftStroke.last].x qBox.bot [leftStroke.last].y
85 changes: 85 additions & 0 deletions packages/font-glyphs/src/letter-like/fraktur/lower-bopvw.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
$$include '../../meta/macros.ptl'

glyph-module

glyph-block LetterLike-Fraktur-Lower-BOPVW : begin
glyph-block-import Common-Derivatives
glyph-block-import CommonShapes
glyph-block-import LetterLike-Fraktur-Common : LowerDf S M fraktur-stroke change-pen
glyph-block-import LetterLike-Fraktur-Common : DecoSizeX DecoSizeY SlopeA SlopeB
glyph-block-import LetterLike-Fraktur-Common : Wave FHook PHexTop PHexBot LTDecoration

define [ORightShape mode profile oBox] : fraktur-stroke profile
corner oBox.left [post@slope SlopeA]
[cg2.sr SlopeB].start [oBox.xp PHexTop] oBox.top
g2.down.mid (oBox.right - OX) [mix@ 0.5]
[g2c.sl SlopeA].start [oBox.xp PHexBot] oBox.bot
corner oBox.left [pre@slope SlopeB]
match mode
[Just 'o'] : close
[Just 'p'] : ~~~ [corner (pre@ <-> DecoSizeX) (pre@ <-> DecoSizeY)]
___ : list

create-glyph "frak/o" 0xAB3D : glyph-proc
local df : include : LowerDf 1
include : df.markSet.e

local oBox : S.box XH 0 df.leftSB df.rightSB
include : ORightShape 'o' S oBox

alias 'mathFrak/o' 0x1D52C 'frak/o'

create-glyph "frak/b" 0x1D51F : glyph-proc
local df : include : LowerDf 1
include : df.markSet.b

local oBox : S.box XH 0 df.leftSB df.rightSB
local bBox : S.box Ascender 0 df.leftSB df.rightSB

local rightStroke : include : ORightShape 'b' S oBox
local leftStroke : include : fraktur-stroke S
LTDecoration bBox.left bBox.top
corner [rightStroke.last].x [rightStroke.last].y

create-glyph "frak/p" 0x1D52D : glyph-proc
local df : include : LowerDf 1
include : df.markSet.p

local oBox : S.box XH 0 df.leftSB df.rightSB
local pBox : S.box XH Descender df.leftSB df.rightSB

local rightStroke : include : ORightShape 'p' S oBox
local leftStroke : include : fraktur-stroke S
LTDecoration pBox.left pBox.top [rightStroke.first].y
corner pre@ pBox.bot

create-glyph "frak/v" 0x1D533 : glyph-proc
local df : include : LowerDf 1
include : df.markSet.e

local vBox : S.box XH 0 df.leftSB df.rightSB

local rightStroke : include : ORightShape 'v' S vBox
local leftStroke : include : fraktur-stroke S
LTDecoration vBox.left vBox.top [rightStroke.first].y
corner [rightStroke.last].x [rightStroke.last].y

create-glyph "frak/w" 0x1D534 : glyph-proc
local df : include : LowerDf para.diversityM 3
include : df.markSet.e

local wBox : M.box XH 0 df.leftSB df.rightSB
local rightHalfBox : wBox.withLeft wBox.xMid
local leftHalfBox : wBox.withRight wBox.xMid

local rightStroke : include : ORightShape 'o' M rightHalfBox
local middleStroke : include : fraktur-stroke M
corner leftHalfBox.left [post@slope SlopeA]
corner [leftHalfBox.xp PHexTop] leftHalfBox.top
corner leftHalfBox.right [pre@slope SlopeB]
corner pre@ [post@slope SlopeA]
corner [leftHalfBox.xp PHexBot] leftHalfBox.bot
corner leftHalfBox.left [pre@slope SlopeB]
local leftStroke : include : fraktur-stroke M
LTDecoration leftHalfBox.left leftHalfBox.top [middleStroke.first].y
corner [middleStroke.last].x [middleStroke.last].y
40 changes: 40 additions & 0 deletions packages/font-glyphs/src/letter-like/fraktur/lower-ce.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
$$include '../../meta/macros.ptl'

glyph-module

glyph-block LetterLike-Fraktur-Lower-CE : begin
glyph-block-import Common-Derivatives
glyph-block-import CommonShapes
glyph-block-import LetterLike-Fraktur-Common : LowerDf S F T fraktur-stroke change-pen
glyph-block-import LetterLike-Fraktur-Common : DecoSizeX DecoSizeY SlopeA SlopeB
glyph-block-import LetterLike-Fraktur-Common : Wave FHook PHexTop PHexBot

create-glyph "frak/e" 0xAB32 : glyph-proc
local df : include : LowerDf 1
include : df.markSet.e

local box : S.box XH 0 df.leftSB df.rightSB
include : fraktur-stroke S
corner (box.left + S.thick) [post@slope SlopeA]
g2 box.xMid [box.yp DesignParameters.eBarPos]
corner box.right [pre@slope SlopeA]
corner [box.xp PHexTop] box.top
corner box.left [pre@slope SlopeA]
curl pre@ (post@ <+> ArchDepthB)
[g2c.sr (-SlopeA)].end [box.xp PHexTop] box.bot
corner box.right [pre@slope SlopeA]

alias 'mathFrak/e' 0x1D522 'frak/e'

create-glyph "frak/c" 0x1D520 : glyph-proc
local df : include : LowerDf 1
include : df.markSet.e

local box : S.box XH 0 df.leftSB df.rightSB
include : fraktur-stroke S
corner box.right [post@slope SlopeB]
corner [box.xp PHexTop] box.top
corner box.left [pre@slope SlopeA]
curl pre@ (post@ <+> ArchDepthB)
[g2c.sr (-SlopeA)].end [box.xp PHexTop] box.bot
corner box.right [pre@slope SlopeA]
27 changes: 27 additions & 0 deletions packages/font-glyphs/src/letter-like/fraktur/lower-d.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$$include '../../meta/macros.ptl'

glyph-module

glyph-block LetterLike-Fraktur-Lower-D : begin
glyph-block-import Common-Derivatives
glyph-block-import CommonShapes
glyph-block-import LetterLike-Fraktur-Common : LowerDf S F T fraktur-stroke change-pen
glyph-block-import LetterLike-Fraktur-Common : DecoSizeX DecoSizeY SlopeA SlopeB
glyph-block-import LetterLike-Fraktur-Common : Wave FHook PHexTop PHexBot

create-glyph "frak/d" 0x1D521 : glyph-proc
local df : include : LowerDf 1
include : df.markSet.b

local oBox : S.box XH 0 df.leftSB df.rightSB
local dBox : S.box Ascender 0 df.leftSB df.rightSB

include : fraktur-stroke S
corner [oBox.xp PHexTop] oBox.top
~~~ ~~~ [corner oBox.left [pre@slope SlopeA]]
~~~ ~~~ [corner pre@ [post@slope SlopeB]]
~~~ [corner [oBox.xp PHexBot] oBox.bot]
~~~ ~~~ [straight.up.mid (oBox.right - OX) oBox.yMid]
[g4.sl SlopeB].mid pre@ pre@
g2 oBox.left [pre@slope SlopeB]
[g2.sr SlopeA].end [oBox.xp 0.25] dBox.top [change-pen T]
27 changes: 0 additions & 27 deletions packages/font-glyphs/src/letter-like/fraktur/lower-e.ptl

This file was deleted.

Loading

0 comments on commit bf15291

Please sign in to comment.