mirror of
https://github.com/multipleof4/stain.otf.git
synced 2026-01-14 00:27:55 +00:00
Fix: Clean up lowercase g to single-storey
This commit is contained in:
@@ -40,39 +40,42 @@ export const glyphg=(opentype,adv)=>
|
||||
"g",
|
||||
"g".codePointAt(0),
|
||||
p=>{
|
||||
// single-storey "g" with open top, bowl and right descender
|
||||
const xMin=80,xMax=520;
|
||||
const bowlTop=260,bowlBottom=-10;
|
||||
const base=480,desc=-150;
|
||||
// single‑storey g: round bowl + right descender, no stray vertical slice
|
||||
const cx=300;
|
||||
const rOuter=210;
|
||||
const rInner=130;
|
||||
|
||||
// bowl outer
|
||||
p.moveTo(300,bowlBottom);
|
||||
p.curveTo(180,bowlBottom,xMin,80,xMin,230);
|
||||
p.curveTo(xMin,380,190,470,310,470);
|
||||
p.curveTo(410,470,480,430,510,360);
|
||||
// join into stem
|
||||
p.lineTo(510,base);
|
||||
// stem down to descender
|
||||
p.lineTo(450,base);
|
||||
p.lineTo(450,desc);
|
||||
p.lineTo(510,desc);
|
||||
p.lineTo(510,200);
|
||||
p.curveTo(510,80,430,bowlBottom,300,bowlBottom);
|
||||
// outer bowl
|
||||
p.moveTo(cx, -10);
|
||||
p.curveTo(cx- rOuter, -10, 90, 90, 90,230);
|
||||
p.curveTo(90,370, cx- rOuter+40,470, cx,470);
|
||||
p.curveTo( cx+ rOuter-40,470,510,370,510,230);
|
||||
p.curveTo(510,90, cx+ rOuter-40,-10, cx,-10);
|
||||
p.close();
|
||||
|
||||
// bowl inner
|
||||
p.moveTo(300,50);
|
||||
p.curveTo(390,50,450,110,450,230);
|
||||
p.curveTo(450,350,390,410,300,410);
|
||||
p.curveTo(210,410,150,350,150,230);
|
||||
p.curveTo(150,110,210,50,300,50);
|
||||
// inner counter
|
||||
p.moveTo(cx,50);
|
||||
p.curveTo(cx+ rInner,50, cx+ rInner,130, cx+ rInner,230);
|
||||
p.curveTo(cx+ rInner,330, cx,410, cx,410);
|
||||
p.curveTo(cx- rInner,410, cx- rInner,330, cx- rInner,230);
|
||||
p.curveTo(cx- rInner,130, cx- rInner,50, cx,50);
|
||||
p.close();
|
||||
|
||||
// open ear/top hook on right side
|
||||
p.moveTo(450,320);
|
||||
p.curveTo(420,260,370,230,310,230);
|
||||
p.lineTo(310,170);
|
||||
p.curveTo(395,170,460,205,500,270);
|
||||
// descender from right bowl edge
|
||||
p.moveTo(450,230);
|
||||
p.curveTo(450,360,390,430,310,430);
|
||||
p.lineTo(310,490);
|
||||
p.curveTo(420,490,510,410,510,260);
|
||||
p.lineTo(510,-150);
|
||||
p.lineTo(450,-150);
|
||||
p.lineTo(450,230);
|
||||
p.close();
|
||||
|
||||
// small ear on upper-right
|
||||
p.moveTo(420,260);
|
||||
p.curveTo(455,245,480,215,495,180);
|
||||
p.lineTo(455,160);
|
||||
p.curveTo(440,190,420,210,395,225);
|
||||
p.close();
|
||||
|
||||
return p;
|
||||
|
||||
Reference in New Issue
Block a user