Skip to content

Commit

Permalink
Release 31.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Sep 9, 2024
2 parents c27735f + e7019e5 commit cd14ef2
Show file tree
Hide file tree
Showing 22 changed files with 280 additions and 237 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Modifications since last major version

### 31.6.1

- Fix broken accent stacking behavior for partially precomposed characters with leaning anchors (#2492).


### 31.6.0

* Add Latin localization forms for Polish and Romanian.
Expand Down
1 change: 1 addition & 0 deletions changes/31.6.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix broken accent stacking behavior for partially precomposed characters with leaning anchors (#2492).
274 changes: 137 additions & 137 deletions doc/PACKAGE-LIST.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions images/button-release.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions images/button-release.light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 40 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iosevka/monorepo",
"version": "31.6.0",
"version": "31.6.1",
"workspaces": [
"packages/*",
"tools/*"
Expand Down
12 changes: 6 additions & 6 deletions packages/font-glyphs/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@iosevka/font-glyphs",
"version": "31.6.0",
"version": "31.6.1",
"private": true,
"exports": {
".": "./lib/index.mjs",
"./aesthetics": "./lib/meta/aesthetics.mjs",
"./unicode-knowledge": "./lib/meta/unicode-knowledge.mjs"
},
"dependencies": {
"@iosevka/font-kits": "31.6.0",
"@iosevka/geometry": "31.6.0",
"@iosevka/geometry-cache": "31.6.0",
"@iosevka/glyph": "31.6.0",
"@iosevka/util": "31.6.0",
"@iosevka/font-kits": "31.6.1",
"@iosevka/geometry": "31.6.1",
"@iosevka/geometry-cache": "31.6.1",
"@iosevka/glyph": "31.6.1",
"@iosevka/util": "31.6.1",
"typo-geom": "^0.16.1"
}
}
60 changes: 45 additions & 15 deletions packages/font-glyphs/src/auto-build/accents.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,22 @@ glyph-block AutoBuild-Accents : begin
return amended

# Here, we build a simplified substitution builder that does the mark substitutions
define [substParts parts ignore backtrack input loookAhead production] : begin
# This is similar to GSUB lookup type 6 but with more flexibility
define flex-params [substParts] : begin
local-parameter : parts
local-parameter : ignore -- MatchUtil.never
local-parameter : backtrack -- {}
local-parameter : input
local-parameter : lookAhead -- {}
local-parameter : replace
local igl 0
while (igl < parts.length) : begin
local m : substMatch parts igl ignore backtrack input loookAhead
local m : substMatch parts igl ignore backtrack input lookAhead
if [not m]
: then : inc igl
: else : begin
local inputGlyphs : ArrayUtil.mapIndexToItems parts m
local producedGlyphs : production.apply null inputGlyphs
local producedGlyphs : replace.apply null inputGlyphs
foreach i [range (m.length - 1) downtill 0] : begin
parts.splice m.(i) 1
ArrayUtil.insertSliceAt parts m.0 producedGlyphs
Expand Down Expand Up @@ -78,24 +85,22 @@ glyph-block AutoBuild-Accents : begin

return m

# Match/replace directives
define [dotless g] : begin
local gDotless : query-glyph : Dotless.get g
if [not gDotless] : return null
return {gDotless}

define [isMark k] : function [g] : begin
return : g && g.markAnchors && g.markAnchors.(k)
define [isMarkExcluding k] : function [g] : begin
return : g && g.markAnchors && [Object.keys g.markAnchors].length && !g.markAnchors.(k)
define [hasBaseAnchor k] : function [g] : begin
return : g && g.baseAnchors && g.baseAnchors.(k)
define [isLeaningMark k] : function [g] : begin
return : g && g.markAnchors && g.markAnchors.(k) && [LeaningMark.get g]
define [leaningMarkSplit g] : begin
define [produceLeaningMark gnSuppressAnchor] : function [g] : begin
local spacer : query-glyph : LeaningMarkSpacer.get g
local alternative : query-glyph : LeaningMark.get g
if (spacer && alternative) : return { spacer alternative }
return { g }
return { [query-glyph gnSuppressAnchor] g }

define [markSubst uk] : begin
local mapping : new Map
Expand Down Expand Up @@ -165,23 +170,48 @@ glyph-block AutoBuild-Accents : begin
### Keep the semantics here synchronized with `ccmp` feature

# Handle dotless form
substParts parts [isMarkExcluding 'above'] {} {dotless} {[isMark 'above']} dotless
substParts parts
ignore -- [isMarkExcluding 'above']
input -- {dotless}
lookAhead -- {[isMark 'above']}
replace -- dotless

# Handle iota subscript
substParts parts iotaLF.ignore {[hasBaseAnchor 'lf']} {iotaLF.matcher} {} iotaLF.production
substParts parts
ignore -- iotaLF.ignore
backtrack -- {[hasBaseAnchor 'lf']}
input -- {iotaLF.matcher}
replace -- iotaLF.production

# Handle ogonek
substParts parts ogonek.ignore {[hasBaseAnchor 'trailing']} {ogonek.matcher} {} ogonek.production
substParts parts
ignore -- ogonek.ignore
backtrack -- {[hasBaseAnchor 'trailing']}
input -- {ogonek.matcher}
replace -- ogonek.production

# Handle mark combinations (Greek)
substParts parts MatchUtil.never {} { markComposition.matchFirst markComposition.matchSecond } {} markComposition.production
substParts parts
input -- { markComposition.matchFirst markComposition.matchSecond }
replace -- markComposition.production

# Handle upper Greek Tonos marks
substParts parts MatchUtil.never {[hasBaseAnchor 'grekUpperTonos']} {upperTonos.matcher} {} upperTonos.production
substParts parts
backtrack -- {[hasBaseAnchor 'grekUpperTonos']}
input -- {upperTonos.matcher}
replace -- upperTonos.production

# Handle leaning marks
substParts parts [isMarkExcluding 'above'] {[MatchUtil.either [hasBaseAnchor 'leaningAbove'] [isMark 'leaningAbove']]} {[isLeaningMark 'above']} {} leaningMarkSplit
substParts parts [isMarkExcluding 'below'] {[MatchUtil.either [hasBaseAnchor 'leaningBelow'] [isMark 'leaningBelow']]} {[isLeaningMark 'below']} {} leaningMarkSplit
substParts parts
ignore -- [isMarkExcluding 'above']
backtrack -- {[MatchUtil.either [hasBaseAnchor 'leaningAbove'] [isMark 'leaningAbove']]}
input -- {[isMark 'above']}
replace -- [produceLeaningMark 'mark/suppressLeaningAboveAnchor']
substParts parts
ignore -- [isMarkExcluding 'below']
backtrack -- {[MatchUtil.either [hasBaseAnchor 'leaningBelow'] [isMark 'leaningBelow']]}
input -- {[isMark 'below']}
replace -- [produceLeaningMark 'mark/suppressLeaningBelowAnchor']

define [pad _s n] : begin
local s _s
Expand Down
9 changes: 9 additions & 0 deletions packages/font-glyphs/src/marks/adjust.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,12 @@ glyph-block Mark-Adjustment : begin

export : define Above : Impl 'above' 'leaningAbove'
export : define Below : Impl 'below' 'leaningBelow'

# "Technical" marks, used to suppress leaning anchors.
# Used in the build process of precomposed glyphs.
create-glyph "mark/suppressLeaningAboveAnchor" : glyph-proc
set-width 0
set-mark-anchor 'leaningAbove' 0 0
create-glyph "mark/suppressLeaningBelowAnchor" : glyph-proc
set-width 0
set-mark-anchor 'leaningBelow' 0 0
Loading

0 comments on commit cd14ef2

Please sign in to comment.