Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize Macedonian support by adding italic gje (ѓ) #1267

Closed
d125q opened this issue Dec 21, 2021 · 0 comments
Closed

Finalize Macedonian support by adding italic gje (ѓ) #1267

d125q opened this issue Dec 21, 2021 · 0 comments

Comments

@d125q
Copy link

d125q commented Dec 21, 2021

Currently, the Serbian/Macedonian localized form contains only ghe (г), which appears in both Serbian and Macedonian. However, it is missing gje (ѓ), which appears only in Macedonian.

I am not at all familiar with the source code, but the following patch appears to work:

diff --git a/font-src/glyphs/letter/cyrillic/orthography.ptl b/font-src/glyphs/letter/cyrillic/orthography.ptl
index d6bd5a0..e9e6d0f 100644
--- a/font-src/glyphs/letter/cyrillic/orthography.ptl
+++ b/font-src/glyphs/letter/cyrillic/orthography.ptl
@@ -27,5 +27,6 @@ glyph-block Letter-Cyrillic-Orthography : begin
 	orthographic-italic 'cyrl/ve'             0x432
 	orthographic-italic 'cyrl/gheStrokeHook'  0x4FB
 
-	CreateAccentedComposition 'cyrl/ibreve' 0x439 'cyrl/i' 'breveAbove'
-	CreateAccentedComposition 'cyrl/igrave' 0x45D 'cyrl/i' 'graveAbove'
+	CreateAccentedComposition 'cyrl/ibreve' 0x439 'cyrl/i'   'breveAbove'
+	CreateAccentedComposition 'cyrl/gje'    0x453 'cyrl/ghe' 'acuteAbove'
+	CreateAccentedComposition 'cyrl/igrave' 0x45D 'cyrl/i'   'graveAbove'
diff --git a/font-src/glyphs/letter/latin/lower-i.ptl b/font-src/glyphs/letter/latin/lower-i.ptl
index 9f9835c..183ff01 100644
--- a/font-src/glyphs/letter/latin/lower-i.ptl
+++ b/font-src/glyphs/letter/latin/lower-i.ptl
@@ -303,6 +303,8 @@ glyph-block Letter-Latin-Lower-I : begin
 		include [refer-glyph src] AS_BASE ALSO_METRICS
 		include : refer-glyph "macronAbove"
 
+	CreateAccentedComposition 'cyrl/gje.SRB' null 'cyrl/ghe.SRB' 'acuteAbove'
+
 	glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
 	create-glyph 'mathbb/dotlessi' : glyph-proc
 		include : MarkSet.e
diff --git a/font-src/otl/gsub-locl.ptl b/font-src/otl/gsub-locl.ptl
index c5861ff..420bedc 100644
--- a/font-src/otl/gsub-locl.ptl
+++ b/font-src/otl/gsub-locl.ptl
@@ -18,6 +18,7 @@ export : define [buildLOCL sink para glyphStore] : begin
 				'cyrl/be'  : glyphStore.ensureExists 'cyrl/be.SRB'
 				'cyrl/ghe' : glyphStore.ensureExists 'cyrl/ghe.SRB'
 				'cyrl/de'  : glyphStore.ensureExists 'cyrl/de.SRB'
+				'cyrl/gje' : glyphStore.ensureExists 'cyrl/gje.SRB'
 				'cyrl/pe'  : glyphStore.ensureExists 'cyrl/pe.SRB'
 				'cyrl/te'  : glyphStore.ensureExists 'cyrl/te.SRB'
 			object

The semantics are admittedly not perfect since, as mentioned, the Serbian alphabet does not use gje, so it should really only be added to the Macedonian localized form. (On the other hand, since the letter is not used, it does not really do any harm...) Feel free to rework it if you think it makes more sense to have separate Serbian and Macedonian localized forms.

This is what happens without the patch:

Incorrect italic gje in Macedonian

And this is what happens with it:

Correct italic gje in Macedonian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants