Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix placement of superscript/subscript i and l (#2457) #2459

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions packages/font-glyphs/src/auto-build/transformed.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ glyph-block Autobuild-Transformed-Shared : begin

glyph-block-export ToSuperscript
define [ToSuperscript div] : glyph-proc
local df : DivFrame df
local df : DivFrame div
include [Ungizmo] true
include [Translate (-df.middle) (-CAP)] true
include [Scale ToSuperscript.crowdAdjScale] true
Expand All @@ -88,7 +88,7 @@ glyph-block Autobuild-Transformed-Shared : begin

glyph-block-export ToSubscript
define [ToSubscript div] : glyph-proc
local df : DivFrame df
local df : DivFrame div
include [Ungizmo] true
include [Translate (-df.middle) 0] true
include [Scale ToSubscript.crowdAdjScale] true
Expand Down Expand Up @@ -368,16 +368,15 @@ glyph-block Autobuild-Transformed : begin
local miniatureFont : Miniature pendingGlyphs
crowd -- ToSuperscript.crowd
scale -- ToSuperscript.crowdAdjScale
mono -- true
# mono -- true
sbscale -- 0.75
foreach { unicode glyphid fRelated } [items-of records]
if [not : query-glyph targetNameMap.(glyphid)] : begin
create-glyph (targetNameMap.(glyphid)) unicode : glyph-proc
if [not : miniatureFont.queryByName glyphid] : begin
throw : new Error "Cannot find glyph \(glyphid)"
local middle : [miniatureFont.queryByName glyphid].advanceWidth / 2
include [miniatureFont.queryByName glyphid] AS_BASE ALSO_METRICS
include : ToSuperscript
include : ToSuperscript (currentGlyph.advanceWidth / Width)
IsSuperscript.set currentGlyph
if ([not fRelated] && gr) : gr.set [query-glyph glyphid] (targetNameMap.(glyphid))
link-relations relSets
Expand Down Expand Up @@ -476,14 +475,13 @@ glyph-block Autobuild-Transformed : begin
local miniatureFont : Miniature pendingGlyphs
crowd -- ToSubscript.crowd
scale -- ToSubscript.crowdAdjScale
mono -- true
# mono -- true
sbscale -- 0.75
foreach { unicode glyphid fRelated } [items-of records]
if [not : query-glyph targetNameMap.(glyphid)] : begin
create-glyph (targetNameMap.(glyphid)) unicode : glyph-proc
local middle : [miniatureFont.queryByName glyphid].advanceWidth / 2
include [miniatureFont.queryByName glyphid] AS_BASE ALSO_METRICS
include : ToSubscript
include : ToSubscript (currentGlyph.advanceWidth / Width)
IsSubscript.set currentGlyph
if ([not fRelated] && gr) : gr.set [query-glyph glyphid] (targetNameMap.(glyphid))
link-relations relSets
Expand Down
Loading