Prevent clipping of texture-extended glyphs in Kitty (#2466)

* Prevent clipping of texture-extended glyphs in Kitty

* doc
This commit is contained in:
Belleve 2024-08-12 22:07:16 -10:00 committed by GitHub
parent 47b3424083
commit e5736b6fd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View file

@ -1 +1,2 @@
* Add `diagonal-tailed-cursive` variants for Cyrillic Lower Ef (`cv93`). * Add `diagonal-tailed-cursive` variants for Cyrillic Lower Ef (`cv93`).
* Prevent clipping of texture-extended glyphs in Kitty.

View file

@ -3,7 +3,8 @@ $$include '../meta/macros.ptl'
import [linreg clamp mix fallback] from "@iosevka/util" import [linreg clamp mix fallback] from "@iosevka/util"
import [getGrTree IsSuperscript IsSubscript AnyCvOrCherryPicking] from "@iosevka/glyph/relation" import [getGrTree IsSuperscript IsSubscript AnyCvOrCherryPicking] from "@iosevka/glyph/relation"
import [AnyLocalizedForm DotlessOrNot CvDecompose MathSansSerif Texture] from "@iosevka/glyph/relation" import [AnyLocalizedForm DotlessOrNot CvDecompose MathSansSerif] from "@iosevka/glyph/relation"
import [Texture Joining] from "@iosevka/glyph/relation"
import [BooleanGeometry StrokeGeometry] from "@iosevka/geometry" import [BooleanGeometry StrokeGeometry] from "@iosevka/geometry"
import [NumeratorForm DenominatorForm] from "@iosevka/glyph/relation" import [NumeratorForm DenominatorForm] from "@iosevka/glyph/relation"
import [Transform] from "@iosevka/geometry/transform" import [Transform] from "@iosevka/geometry/transform"
@ -725,6 +726,8 @@ glyph-block Autobuild-Transformed-Texture : begin
create-glyph targetNameMap.(glyphid) unicode : glyph-proc create-glyph targetNameMap.(glyphid) unicode : glyph-proc
include glyphT AS_BASE ALSO_METRICS include glyphT AS_BASE ALSO_METRICS
set-width Width set-width Width
if (extL > 0) : Joining.or currentGlyph Joining.Classes.Left
if (extR > 0) : Joining.or currentGlyph Joining.Classes.Right
if extL : begin if extL : begin
local shift : (glyphT.advanceWidth - Width) * extL / (extL + extR) local shift : (glyphT.advanceWidth - Width) * extL / (extL + extR)
currentGlyph.applyTransform [Translate (-shift) 0] true currentGlyph.applyTransform [Translate (-shift) 0] true

View file

@ -137,7 +137,7 @@ export const Joining = {
glyph.related.joining = cls; glyph.related.joining = cls;
}, },
or(glyph, cls) { or(glyph, cls) {
Joining.set(glyph, cls | Joining.get(cls)); Joining.set(glyph, cls | Joining.get(glyph));
}, },
amendOtName(baseName, cl) { amendOtName(baseName, cl) {
switch (cl) { switch (cl) {