Skip to content

Commit

Permalink
Sinhala: add SVG images, markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
n8willis committed Apr 4, 2024
1 parent a72b506 commit 7a3d24d
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 18 deletions.
18 changes: 18 additions & 0 deletions images/sinhala/right-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 204 additions & 0 deletions images/sinhala/sinhala-svg-image-generation-log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# Commands used to generate the images in [opentype-shaping-sinhala.md](../../opentype-shaping-sinhala.md)

## Arrow general

hb-view --font-size=110 --output-file=right-arrow.svg --background=FFFFFF00 --margin=0,0,0,0 /usr/share/fonts/opentype/gentiumplus/GentiumPlus-R.ttf --unicodes=2192


## 2.2 Matra decomposition

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-matra-decompose-before.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dda

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-matra-decompose-after.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dd9,25cc,0dca

svg_stack --direction=h sinhala-matra-decompose-before.svg right-arrow.svg sinhala-matra-decompose-after.svg > sinhala-matra-decompose.svg


## 2.7 Post-base consonants

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-vatu-va-before.svg --features=-vatu --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dca,200d,0dba

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-vatu-va-after.svg --features=+vatu --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dca,200d,0dba

svg_stack --direction=h sinhala-vatu-va-before.svg right-arrow.svg sinhala-vatu-va-after.svg > sinhala-vatu-va.svg


## 3.3 `akhn`

### Ligature

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-akhn-ligature-before.svg --features=-akhn --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9a,25cc,0dca,200d,0dc2

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-akhn-ligature-after.svg --features=+akhn --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9a,0dca,200d,0dc2

svg_stack --direction=h sinhala-akhn-ligature-before.svg right-arrow.svg sinhala-akhn-ligature-after.svg > sinhala-akhn-ligature.svg

### Touching

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-akhn-touching-before.svg --features=-akhn,-pres --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9c,200d,25cc,0dca,0d9d

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-akhn-touching-after.svg --features=+akhn,+pres --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9c,200d,0dca,0d9d

svg_stack --direction=h sinhala-akhn-touching-before.svg right-arrow.svg sinhala-akhn-touching-after.svg > sinhala-akhn-touching.svg


## 3.4 `rphf`

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-rphf-before.svg --features=-rphf --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,25cc

hb-view --font-size=110 --margin=2,16,2,64 --output-file=sinhala-rphf-after.svg --features=+rphf --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,25cc

svg_stack --direction=h sinhala-rphf-before.svg right-arrow.svg sinhala-rphf-after.svg > sinhala-rphf.svg


## 3.10 `pstf`

> Not needed?
hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-pstf-before.svg --features=-pstf --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dde

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-pstf-after.svg --features=+pstf --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0ddf

svg_stack --direction=h sinhala-pstf-before.svg right-arrow.svg sinhala-pstf-after.svg > sinhala-pstf.svg


## 3.11 `vatu`

### Ra

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-vatu-ra-before.svg --features=-vatu --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dca,200d,0dbb

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-vatu-ra-after.svg --features=+vatu --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dca,200d,0dbb

svg_stack --direction=h sinhala-vatu-ra-before.svg right-arrow.svg sinhala-vatu-ra-after.svg > sinhala-vatu-ra.svg

### Va

> Same as 2.7

## 4.2 Pre-base matras

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-matra-position-before.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=25cc,0dd9,0da0,0dca,0db1,0dca,200d,0daf,0dca,200d,0dbb,0dcf

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-matra-position-after.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0da0,0dca,0db1,0dca,200d,0daf,0dca,200d,0dbb,0ddc

svg_stack --direction=h sinhala-matra-position-before.svg right-arrow.svg sinhala-matra-position-after.svg > sinhala-matra-position.svg


## 4.3 Reph position

hb-view --font-size=110 --margin=2,16,2,64 --output-file=sinhala-reph-position-before.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,25cc,0dad,0dca,200d,0dae,0dca,200d,0dba,0dd1

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-reph-position-after.svg --features= --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,0dad,0dca,200d,0dae,0dca,200d,0dba,0dd1

svg_stack --direction=h sinhala-reph-position-before.svg right-arrow.svg sinhala-reph-position-after.svg > sinhala-reph-position.svg


## 5 `pres`

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-pres-before.svg --features=-pres --preserve-default-ignorables --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9b,200d,25cc,0dca,0da2

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-pres-after.svg --features=+pres --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9b,200d,0dca,0da2

svg_stack --direction=h sinhala-pres-before.svg right-arrow.svg sinhala-pres-after.svg > sinhala-pres.svg


## 5 `abvs`

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-abvs-before.svg --features=-abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0db6,0dd3

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-abvs-after.svg --features=+abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0db6,0dd3

svg_stack --direction=h sinhala-abvs-before.svg right-arrow.svg sinhala-abvs-after.svg > sinhala-abvs.svg


## 5 `blws`

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-blws-before.svg --features=-blws --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0db7,0dd6

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-blws-after.svg --features=+blws --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0db7,0dd6

svg_stack --direction=h sinhala-blws-before.svg right-arrow.svg sinhala-blws-after.svg > sinhala-blws.svg


## 5 `psts`

> Note: this lookup only works in Noto Sans. Needs more investigation.
hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-psts-before.svg --features=-psts --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSansSinhala-Regular.ttf --unicodes=0daf,0dca,200d,0dba,0ddd

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-psts-after.svg --features=+psts --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSansSinhala-Regular.ttf --unicodes=0daf,0dca,200d,0dba,0ddd

svg_stack --direction=h sinhala-psts-before.svg right-arrow.svg sinhala-psts-after.svg > sinhala-psts.svg


## 6 `abvm`

> Note: Noto Sans Sinhala implements this as an `abvs` substitution
> for unknown reasons.
hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-abvm-before.svg --features=-abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,0dae

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-abvm-after.svg --features=+abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0dbb,0dca,200d,0dae

svg_stack --direction=h sinhala-abvm-before.svg right-arrow.svg sinhala-abvm-after.svg > sinhala-abvm.svg


## 6 `blwm`

> Note: Noto Sans Sinhala double-implements this in both `blwm` and
> `abvs`, even though it is clearly not above-base.
hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-blwm-before.svg --features=-blwm,-abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9f,0dca,200d,0dbb

hb-view --font-size=110 --margin=2,16,2,16 --output-file=sinhala-blwm-after.svg --features=+blwm,+abvs --background=FFFFFF00 /usr/share/fonts/truetype/noto/NotoSerifSinhala-Regular.ttf --unicodes=0d9f,0dca,200d,0dbb

svg_stack --direction=h sinhala-blwm-before.svg right-arrow.svg sinhala-blwm-after.svg > sinhala-blwm.svg















































36 changes: 18 additions & 18 deletions opentype-shaping-sinhala.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Sinhala, however, differs considerably in its use of <samp>"ZWJ"</samp>.
subjoined form of <samp>"Consonant_2"</samp>.

:::{figure-md}
![Reph formation](/images/sinhala/sinhala-rphf.png "Reph formation")
![Reph formation](/images/sinhala/sinhala-rphf.svg "Reph formation")

Reph formation
:::
Expand Down Expand Up @@ -861,7 +861,7 @@ completed before the shaping engine begins step three, below.
> with fonts that were developed only with this behavior in mind.
:::{figure-md}
![Multi-part matra decomposition](/images/sinhala/sinhala-matra-decompose.png "Multi-part matra decomposition")
![Multi-part matra decomposition](/images/sinhala/sinhala-matra-decompose.svg "Multi-part matra decomposition")

Multi-part matra decomposition
:::
Expand Down Expand Up @@ -920,13 +920,13 @@ the <samp>"Yansaya"</samp> form when the `vatu` feature is applied. A
the <samp>"Rakaaraansaya"</samp> form when the `vatu` feature is applied.

:::{figure-md}
![Yansaya ligation](/images/sinhala/sinhala-vatu-va.png "Yansaya ligation")
![Yansaya ligation](/images/sinhala/sinhala-vatu-va.svg "Yansaya ligation")

Yansaya ligation
:::

:::{figure-md}
![Rakaaraansaya ligation](/images/sinhala/sinhala-vatu-ra.png "Rakaaraansaya ligation")
![Rakaaraansaya ligation](/images/sinhala/sinhala-vatu-ra.svg "Rakaaraansaya ligation")

Rakaaraansaya ligation
:::
Expand Down Expand Up @@ -1078,13 +1078,13 @@ In Sinhala, the `akhn` feature provides two substitution types.


:::{figure-md}
![Ligature substitution](/images/sinhala/sinhala-akhn-ligature.png "Ligature substitution")
![Ligature substitution](/images/sinhala/sinhala-akhn-ligature.svg "Ligature substitution")

Ligature substitution
:::

:::{figure-md}
![Touching consonant substitution](/images/sinhala/sinhala-akhn-touching.png "Touching consonant substitution")
![Touching consonant substitution](/images/sinhala/sinhala-akhn-touching.svg "Touching consonant substitution")

Touching consonant substitution
:::
Expand All @@ -1097,7 +1097,7 @@ The `rphf` feature replaces initial <samp>"Ra,Halant,ZWJ"</samp> sequences with


:::{figure-md}
![Reph composition](/images/sinhala/sinhala-rphf.png "Reph composition")
![Reph composition](/images/sinhala/sinhala-rphf.svg "Reph composition")

Reph composition
:::
Expand Down Expand Up @@ -1158,7 +1158,7 @@ decomposition.
> developed only with this behavior in mind.
:::{figure-md}
![Post-base form substitution](/images/sinhala/sinhala-pstf.png "Post-base form substitution")
![Post-base form substitution](/images/sinhala/sinhala-pstf.svg "Post-base form substitution")

Post-base form substitution
:::
Expand All @@ -1176,13 +1176,13 @@ ligatures using the subjoined forms of <samp>"Ra"</samp> or <samp>"Ya"</samp>.


:::{figure-md}
![Rakaaraansaya ligation](/images/sinhala/sinhala-vatu-ra.png "Rakaaraansaya ligation")
![Rakaaraansaya ligation](/images/sinhala/sinhala-vatu-ra.svg "Rakaaraansaya ligation")

Rakaaraansaya ligation
:::

:::{figure-md}
![Yansaya ligation](/images/sinhala/sinhala-vatu-va.png "Yansaya ligation")
![Yansaya ligation](/images/sinhala/sinhala-vatu-va.svg "Yansaya ligation")

Yansaya ligation
:::
Expand Down Expand Up @@ -1251,7 +1251,7 @@ consonant or syllable base, all conjuncts or ligatures that contain
the base consonant or syllable base, and all half forms.

:::{figure-md}
![Pre-base matra positioning](/images/sinhala/sinhala-matra-position.png "Pre-base matra positioning")
![Pre-base matra positioning](/images/sinhala/sinhala-matra-position.svg "Pre-base matra positioning")

Pre-base matra positioning
:::
Expand Down Expand Up @@ -1311,7 +1311,7 @@ left of <samp>"Halant"</samp>, to allow for potential matching with `abvs` or


:::{figure-md}
![Reph positioning](/images/sinhala/sinhala-reph-position.png "Reph positioning")
![Reph positioning](/images/sinhala/sinhala-reph-position.svg "Reph positioning")

Reph positioning
:::
Expand Down Expand Up @@ -1363,7 +1363,7 @@ presentations forms. This can include ligatures, "touching consonant" forms,
and stylistic variants of left-side dependent vowels (matras).

:::{figure-md}
![Pre-base substitutions](/images/sinhala/sinhala-pres.png "Pre-base substitutions")
![Pre-base substitutions](/images/sinhala/sinhala-pres.svg "Pre-base substitutions")

Pre-base substitutions
:::
Expand All @@ -1374,7 +1374,7 @@ presentation forms. This usually includes contextual variants of
above-base marks or contextually appropriate mark-and-base ligatures.

:::{figure-md}
![Above-base substitutions](/images/sinhala/sinhala-abvs.png "Above-base substitutions")
![Above-base substitutions](/images/sinhala/sinhala-abvs.svg "Above-base substitutions")

Above-base substitutions
:::
Expand All @@ -1386,7 +1386,7 @@ syllable bases
and attached below-base marks with contextual ligatures.

:::{figure-md}
![Below-base substitutions](/images/sinhala/sinhala-blws.png "Below-base substitutions")
![Below-base substitutions](/images/sinhala/sinhala-blws.svg "Below-base substitutions")

Below-base substitutions
:::
Expand All @@ -1397,7 +1397,7 @@ dependent vowels (matras) with stylistic variants or replacing
base-consonant/matra pairs with contextual ligatures.

:::{figure-md}
![Post-base substitutions](/images/sinhala/sinhala-psts.png "Post-base substitutions")
![Post-base substitutions](/images/sinhala/sinhala-psts.svg "Post-base substitutions")

Post-base substitutions
:::
Expand Down Expand Up @@ -1438,7 +1438,7 @@ characters. In Sinhala, this includes <samp>"Reph"</samp> in addition to
above-base dependent vowels (matras), diacritical marks, and Vedic signs.

:::{figure-md}
![Above-base mark positioning](/images/sinhala/sinhala-abvm.png "Above-base mark positioning")
![Above-base mark positioning](/images/sinhala/sinhala-abvm.svg "Above-base mark positioning")

Above-base mark positioning
:::
Expand All @@ -1448,7 +1448,7 @@ characters. In Sinhala, this includes below-base dependent vowels
(matras) and diacritical marks.

:::{figure-md}
![Below-base mark positioning](/images/sinhala/sinhala-blwm.png "Below-base mark positioning")
![Below-base mark positioning](/images/sinhala/sinhala-blwm.svg "Below-base mark positioning")

Below-base mark positioning
:::

0 comments on commit 7a3d24d

Please sign in to comment.