-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dotted circle for ാം rendering
This has been a recurrent issue for the users. While browser and most modern applications use recent shaping engines that remove the dotted circle, applications like libreoffice has this issue unresolved for long time. Here, remove the dotted circle if followed by aa sign and anuswara. This rule will be picked up only if shaping engines had not removed the dotted circle.
- Loading branch information
1 parent
6719c04
commit 98a85c5
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
input glyph; | ||
beginglyph; | ||
slant_ := tand(-8); | ||
height_correction := thick/4; | ||
z0=(0, m/2); | ||
z1=(x0 + mw/3, m - height_correction); | ||
z2=(x1 + mw/3, y0); | ||
z3=(x2 - mw/3, height_correction); | ||
paths[0] = z0 .. z1.. z2 .. z3 .. cycle; | ||
paths[0] := paths[0] xyscaled(1,1) slanted slant_; | ||
paths[0]:= paths[0] shifted (-slant_*m/2, 0); | ||
paths[0]:= subpath(.3, 2.9) of paths[0] .. {dir 120}(x0, y0 - m/4); | ||
|
||
pen_stroke( | ||
nib(thinnib)(2) | ||
nib(terminalnib rotated terminalangle 0 of paths[0])(0) | ||
nib(terminalnib rotated terminalangle infinity of paths[0])(infinity) | ||
)(paths[0])(strokes[0]); | ||
|
||
clearxy; | ||
z0=(0, (y1+y3)/2); | ||
z1=((x2+x0)/2, m/2); | ||
z2=(x0+mw/2.25 , y0); | ||
z3=(x1, 0); | ||
z4=(x0, y0); | ||
|
||
paths[1] = z0{dir 90}..z1{dir 4}..z2{dir 266}..z3{dir 184}..{dir 90}z0; | ||
paths[1] := reverse paths[1]; | ||
paths[1] := paths[1] shifted (xpart(point 2 of paths[0]) + 2thick,0); | ||
|
||
pen_stroke( | ||
nib(thicknib)(1, 3) | ||
nib(thinnib)(0, 2, 4) | ||
)(paths[1])(strokes[1]); | ||
|
||
|
||
endglyph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
input glyph; | ||
beginglyph; | ||
|
||
clearxy; | ||
z0=(0, (y1+y3)/2); | ||
z1=((x2+x0)/2, m); | ||
z2=(x0+mw , y0); | ||
z3=(x1, 0); | ||
z4=(x0, y0); | ||
|
||
path fpath; fpath:= z0{dir 90}..z1{dir 4}..z2{dir 266}..z3{dir 184}..{dir 90}z0; | ||
soften:=0; | ||
for j=0 upto 3: | ||
paths[j] := subpath(j, j + .5) of fpath; | ||
pen_stroke( cut(thinnib, rel 90)(0,1, 2))(paths[j])(strokes[j]); | ||
endfor; | ||
|
||
|
||
endglyph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters