silnrsi / font-charis

Fonts for languages and writing systems that use the Latin and Cyrillic scripts
https://software.sil.org/charis/
SIL Open Font License 1.1
76 stars 7 forks source link

Can I generate a custom build with substituted cedilla—comma below glyphs? #18

Open bpj opened 1 year ago

bpj commented 1 year ago

I would like to build a font version which uses the glyph for ‹o̦›[^1] U+0326 COMBINING COMMA BELOW instead of the regular glyph for ‹o̧› U+0327 COMBINING CEDILLA for precomposed Latin letters with cedilla, primarily so that

[^1]: I use ‹o› U+006F LATIN SMALL LETTER O instead of ‹◌› U+25CC DOTTED CIRCLE as it seems like the font GitHub uses lacks a glyph for the latter.

agree in style with

I’m essentially hoping/assuming that precomposed glyphs with diacritics are/can be generated programmatically from base letters and combining diacritic glyphs, so that I merely need to replace the one combining glyph with the other and (re)build the precomposed glyphs.

I pretty much must replace U+0327 with U+0326 rather than the other way around because of U+0123 which effectively uses ‹o̒› U+0312 COMBINING TURNED COMMA ABOVE. That is also what will look best in my opinion.

I am aware of the existence of the precomposed

but I want to be able to just type ‹o̧› U+0327 COMBINING CEDILLA in my source[^2] and then just get the right look in the PDF/rendered HTML whether I apply an NFC normalization or not.

[^2]: I’m using Vim with custom keymaps — basically ~/.XComppse the (superior) Vim way —, Pandoc with its extended Markdown, and then to PDF with XeLaTeX or LuaLaTeX. Web fonts/HTML are also on the horizon. The beauty of Pandoc is that you can generate both LaTeX and HTML from the same source! In this case I also need a Pandoc filter to inject some raw LaTeX markup for font commands and the like since Pandoc has no builtin provision for applying LaTeX commands to those Pandoc AST elements which become spans and divs when generating HTML.

I am also aware that I can use teckit with XeLaTeX but I want to have the possibility to use LuaLaTeX, and above all I only want to change the glyphs, while the encoding should use U+0327, U+00C7 etc., i.e. the substitution should be presentational, not structural.

This is for a fictional language, and I fully understand if you find this too frivolous to waste any time on, but I would appreciate to learn if, and of course preferably also how, I can make a build with these substitutions without using a GUI tool like FontForge; I have cerebral palsy so frankly I’m absolutely hopeless as a GUI user! I suppose substituting the glyph of ‹o̦› U+0326 COMBINING COMMA BELOW for the glyph of ‹o̧› U+0327 COMBINING CEDILLA is trivial; the hard bit is or might be to substitute/(re)build the precomposed glyphs.

Finally I am aware of those other precomposed letters with cedilla:

I don’t care about them at all as I do not need them; I would certainly be OK with substituting the cedilla in them too if that makes it easier to do the overall thing. Strictly speaking I don’t need ‹Ķ› U+0136 LATIN CAPITAL LETTER K WITH CEDILLA and ‹ķ› U+0137 LATIN SMALL LETTER K WITH CEDILLA either, but they already have the glyph I want by default so they are, I suppose, not part of the problem.

Last but not least apologies if this is not the right place to ask. I hope it is since this is, I think, about a customized build and the developers probably are the ones who know the build process best.

Thank you for your patience with this nonsense of mine!

jvgaultney commented 1 year ago

Hi - The easiest solution for you would be to change your text to use U+0326 COMBINING COMMA BELOW instead of the cedilla. You don't need to use the precomposed combinations in Unicode - the OpenType code in the font will position the comma appropriately. The following are just the normal upper and lower case glyphs followed by U+0326:

image

If you did want the g-comma to place the comma above then you could just use U+0123 for that special combination.

There is another benefit to this: If you use this then your text will be able to be displayed with other fonts in different environments. For example, if you ever want to distribute your text as an ebook this would be important. If you hack the font, or create a custom build, then that font will be always needed - forever - to display your text correctly.

Custom builds are certainly possible, and allowed by the license (OFL), but requires significant setup and technical know-how. We have a website - SIL Font Development Guide - that explains how to modify and build the fonts yourself. We would not be able to create a custom build for you.

Hope that helps, Victor