Added a MOSC
feature that turns certain geometric shapes into mosaics (#2212).
This commit is contained in:
parent
7e4cb465c9
commit
c9843ff8da
4 changed files with 21 additions and 0 deletions
|
@ -40,3 +40,4 @@
|
|||
* Fix a disjoint stroke of Outlined Curly `Z` under some weights (#2195).
|
||||
* Unify diagonal box drawings' angles (#2197).
|
||||
* Fix Large Type Piece `U+1CE3B` (#2206).
|
||||
* Added a `MOSC` feature that turns certain geometric shapes into mosaics (#2212).
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from "@iosevka/util"
|
||||
import as Gr from "@iosevka/glyph/relation"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -137,3 +138,9 @@ glyph-block Symbol-Mosaic-Powerline : begin
|
|||
RotatedPowerline 'powerline/slashBottomRight' 0xE0BB 'powerline/slashTopLeft'
|
||||
RotatedPowerline 'powerline/cornerTopRight' 0xE0BE 'powerline/cornerBottomLeft'
|
||||
RotatedPowerline 'powerline/slashTopRight' 0xE0BF 'powerline/slashBottomLeft'
|
||||
|
||||
|
||||
Gr.linkSingleGlyphPairGr glyphStore [MangleName 'blackTriangleRB'] [MangleName 'powerline/cornerBottomRight'] Gr.MosaicForm
|
||||
Gr.linkSingleGlyphPairGr glyphStore [MangleName 'blackTriangleLB'] [MangleName 'powerline/cornerBottomLeft'] Gr.MosaicForm
|
||||
Gr.linkSingleGlyphPairGr glyphStore [MangleName 'blackTriangleLT'] [MangleName 'powerline/cornerTopLeft'] Gr.MosaicForm
|
||||
Gr.linkSingleGlyphPairGr glyphStore [MangleName 'blackTriangleRT'] [MangleName 'powerline/cornerTopRight'] Gr.MosaicForm
|
||||
|
|
|
@ -32,6 +32,9 @@ define [buildGSUB para glyphStore markGlyphs] : begin
|
|||
buildGrFeature gsub glyphStore Gr.Lnum
|
||||
buildGrFeature gsub glyphStore Gr.Onum
|
||||
|
||||
# Mosaic form
|
||||
buildGrFeature gsub glyphStore Gr.MosaicForm
|
||||
|
||||
# zero is handled inside the CV/SS feature builder
|
||||
# As it is a cv/ss "cherry picking".
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ export const Wwid = OtlTaggedProp("Wwid", "WWID", "Narrow cell");
|
|||
export const Lnum = OtlTaggedProp("Lnum", "lnum", "Lining number");
|
||||
export const Onum = OtlTaggedProp("Onum", "onum", "Old-style number");
|
||||
export const Zero = OtlTaggedProp("Zero", "zero", "Slashed zero");
|
||||
export const MosaicForm = OtlTaggedProp("MosaicForm", "MOSC", "Mosaic form");
|
||||
export const AplForm = OtlTaggedProp("AplForm", "APLF", "APL form");
|
||||
export const NumeratorForm = OtlTaggedProp("Numerator", "numr");
|
||||
export const DenominatorForm = OtlTaggedProp("Denominator", "dnom");
|
||||
|
@ -330,6 +331,7 @@ export function createGrDisplaySheet(glyphStore, gn) {
|
|||
displayQueryPairFeatures(glyph, "Width", Nwid, Wwid, typographicFeatures);
|
||||
displayQueryPairFeatures(glyph, "Number Form", Lnum, Onum, typographicFeatures);
|
||||
displayQuerySingleFeature(glyph, AplForm, typographicFeatures);
|
||||
displayQuerySingleFeature(glyph, MosaicForm, typographicFeatures);
|
||||
for (const gr of CvCherryPickingGrs) displayQuerySingleFeature(glyph, gr, typographicFeatures);
|
||||
|
||||
// Query selected character variants
|
||||
|
@ -447,6 +449,14 @@ export function linkSuffixPairGr(gs, tagCis, tagTrans, grCis, grTrans) {
|
|||
}
|
||||
}
|
||||
|
||||
export function linkSingleGlyphPairGr(gs, fromName, toName, gr) {
|
||||
const gFrom = gs.queryByName(fromName);
|
||||
if (!gFrom) return;
|
||||
const gTo = gs.queryByName(toName);
|
||||
if (!gTo) return;
|
||||
gr.set(gFrom, toName);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
export function hashCv(g) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue