Hi there! As per the title, I’m looking for .ttf files to typeset an out-of-print book I found on Burmese Buddhism, I’ve got the keyboard working just fine according to this: Pali Keyboard
But I can’t find the invidual .ttf files so I can port it over to groff. Would like some help in regards to this, I know there’s other .ttf files but I’m concerned over potential compatibility issues between the keyboard config and groff itself so would help if I had the exact .ttf files being used for the keyboard.
I’ve tried digging through the files too but all I found were .ddl files and I’m not sure where the program itself stores the .ttf files. Any directions as to where the program stores the .ttf files would help too.
What format is the book in? Meaning, is it a .doc file, pdf?
If it is already digitized and it is old, it might be using a pre-unicode font scheme. If that is the case, then the Pali keyboard you mention probably won’t work because it seems to be Unicode.
If the text is using a pre-unicode font (CSX? Times Norman?) then you will probably want to run it through a converter to get it to Unicode. Then you can use any font that has the unicode points needed for Pali. (e.g. Favorite Pali fonts for Romanized text)
If you paste a chunk of the Pali text here we might be able to guess which font scheme it is using.
Oh it’s using a .ms macos to be then converted into a .pdf format. But please do not pretend I have forgotten. Here is the source file I’m using: source.ms
I opened the PDF in Mac Preview and copied the text.
I’m not sure what ‘groff’ is, but if you are looking for a font that renders diacritics you could try Source Sans and Source Serif
Groff is basically just LaTeX where it essentially processes text according to a language and converts it into postscript as a .pdf file. It processes English characters just fine, I just need it for the specific .ttf files so I can be able to render Pāḷi characters. I’m sure I can get the Burmese characters just fine since I found some .ttf files online already, just trying to deal with the Pāḷi characters first from this specific Pāḷi character first.
It is a post script type setter ? - so it would take post script fonts?
You are mentioning .ttf which are true type fonts?
when go
man groff
“/” then search “font” I see mention of post script but not true type?
Maybe good idea to mention the “bigger picture” what trying to do as perhaps you’re thinking in technical detail but not realising there migth be another way about it - is it to have the dhamma books as man pages that can also be html, and pdf on a site?*
i wanna help specifically that hehe xD
Also if the post script thing is necessary for printer you may need a post script font and type one font not a true type font - anyway all this is real confusing for me but I could ask my dad a Q in next 5-8 hours (then after that he flys away) but he was typesetter and TeX user when the used that for desktop publishing before GUIs
If you are working in Unicode, there is no such thing as a “Pali font”. You just need a font that has the glyphs with the diacritics. We have already linked to several for you.
To be clear… you are trying to render the Pali words in Latin letters, right? If the book is in English, then you can use any of the fonts on the page I linked to.
It’s okay I don’t mind specifics, it’s typsetting afterall. So basically all I’m doing is I’ve got a non-digitized book I’m translating, it’s got English characters, Burmese characters and Pāḷi characters. Essentially groff is more than capable of producing pdfs, html much like LaTeX besides just man pages for Linux. All I’m having a problem with is tracking down the .ttf files used for the Pāḷi keyboard since I’d like to type it out using just my keyboard but also have groff be able to process those same characters which is why I need the exact .ttf files according to the keyboard layout like the same here, I have looked in the fonts directory but I haven’t found much else, I’ve used Linux for years but I kind of suck with Windows so I’m unsure of the specific technical details of where the unicode is stored in for groff to parse, and in regards to postscript that’s what .pdf files are basically just postscript code run on that produce the output of pdfs: Pali Keyboard
I think I have found a possible preprocessor of groff that may be able to support unicode will get back with that later if the Pali keyboard works just fine.
The fonts that I linked will produce all the characters you need. You can use the Pali keyboard or the extended keyboard on Mac. This should cause no issues with generating post script files in latex. I dont know groff. If you are just working in word to make a screen quality pdf though why not use Mac’s in built pdf generation ability?
Oh I’m using Windows plus I’m trying to ensure that the pdf can work across all PDF readers not just Mac. But in regards to the characters you provided would you have any regarding the Pāḷi keyboard link I sent you? I think they’ll work just fine for groff just need the Pāḷi characters is all. I came across different .ttf sources for the unicode characters for Pāḷi but I’m just not sure if they’re the same ones or not or if they work universally even if they’re not the same ones. Unless they are the same ones and they’re mapped exactly as the same as each other, just confused about that.
Although looking at it now I think groff may already have some pre-installed fonts that include Latin characters so I think I just need to find a way to enable that. I’m confused though, does the Latin Script of Pāḷi use the same characters as like actual Latin? I’m pretty sure they aren’t the same, right? I just don’t think the link you sent matches up with Pāḷi or well the keyboard layout I sent either since well I’ve looked through it and it literally doesn’t have the same characters as the Pāḷi keyboard so why are you suggesting I use this exactly? Those Latin characters you sent over doesn’t have the same characters like “ā” or “ḷ” as outlied in this link I sent: Pali Keyboard
Same for the other fonts linked by Ven. Passana and Ven. Snowbird.
Yes, the script is the characters. You just need to make sure the font supports diacritics in Latin, as others have said. The linked ones do.
(If it helps your understanding, not all fonts support Latin or diacritics. Those are the two requirements for Pali in Latin script)
Fonts can get pretty complicated, but it seems like you might be overthinking it in this case
The extra characters needed to represent Pali accurately are simply regular Latin characters from the extended Latin section of Unicode. The whole point of Unicode is that it is unified code. A Unicode ṭ is always the same exact code point. (Exception: It is possible to spoof the characters with the diacritics by using the ASCII letter t with a separate diacritic underdot character. This is a very bad practice and if your text is doing that the solution is to convert the letter + diacritic into the correct Unicode character.)
And a p used in Pali is the exact same p used to write English. As I keep saying, there is no such thing as a Unicode Pali font. Prior to Unicode, your concerns are completely valid. There were many different encoding schemes and you had to be sure to match the correct scheme font with the text you were using.
But Unicode did away with all that.
Again, the PDF format is the solution to the problem you are trying to solve. The whole point of a PDF is that it looks exactly the same everywhere. The fonts are embedded in the file.
As Anton wrote above, there is no such thing as a ‘Pali font’. There are fonts that have a range of diacritical marks such as macrons (the long line above the ā and ī which indicate the elongation of the sound), underdots, overdots and tildes. The two fonts I like have all the diacritics that you need to represent Pāli phonology with Roman/Latin orthography (characters). Forget about the language called Latin, this is not important.
Many standard fonts will offer a macron and a tilde, but not so many offer underdots and overdots for the characters we need ḍ ṭ ṇ ṃ ṁ ṅ. Both Source and Noto offer these. Noto is a good choice as it will sit seemlessly with the Burmese orthography with similar ‘x heights’.
You can render the above characters with the Pali keyboard you linked above, using the key combinations outlined on the table which you linked to.
For example: ḍ Ctrl + Alt + D
A quick search of ‘groff select fonts’ returns severalarticles on how to tell groff to use custom .otf .ttf and .pfb fonts. Of which the fonts I linked above fall into this category.
Well that was the intent of a “Portable Document Format”, but the spec is so gigantic that it is rare that every renderer correctly renders everything exactly according to spec (ditto for many implementations of massive specs, like Bluetooth, USB-C, CSS, etc)
I’ve written PDF manipulation code before and it is a deep, deep rabbit hole full of other deep rabbit holes. And xkcd: Standards applies as usual
For the use-case of typesetting though, that is extremely common and so generally every production-grade, modern renderer has equivalent implementations.
Really sorry about that, I hadn’t looked close enough. Thanks for the help. But I think well that’s the thing I do appreciate the help but groff handles things somewhat differently in that it asks for specific special characters here’s an example, I understand pdf is meant to handle all that which is why I’m outputting it as so but the very specific core is that I’m trying to ensure compatibility between the Pali keyboard I linked and the Sans link Ven sent, which I am unsure of since they are different.
Here’s an example, I’ve used said unicode from the Pali keyboard link and it outputs:
troff:source.ms:27: warning: special character ‘u0061_0304’ not defined
troff:source.ms:27: warning: special character ‘u006C_0323’ not defined
The lines are referring to “u0061_0304” and “u006C_0323” are very specific characters, of which I am trying to ensure compatibility. Which is why I asked for the specific files for the Pali keyboard link I’ve sent, which nobody is trying to look for? I know unicode is meant to sort out the problems of ASCII but the thing with groff is it has to translate unicode into ASCII. It’s why I’ve been referring to a specific font for Pali in Latin script this entire time.
I repeated the link like 2-3 times including the topic post, but here I just want the files from here, whatever you call it: Pali Keyboard
And just to hammer it in this is the Pali keyboard’s install structure which I’ve taken screenshots of.
For edification, amd64, i386, and ia64 are all instruction set architectures (ISAs) for different CPUs. As in, those should all be equivalent, but only one is used depending on your CPU’s architecture. The program is compiled to each architecture for compatibility.
wow64 is a compatibility layer for 32-bit to 64-bit Windows programs. I haven’t used Windows in quite a long time (nor 32-bit systems), so I’m not really sure why there’s a DLL included for that. Perhaps it’s needed for i386 or something
A DLL is an executable library that the program includes. I wouldn’t be able to tell what’s specifically split inside of it without doing some reverse engineering or looking into how Microsoft Keyboard Layout Creator (MSKLC) worked (what the site says it was made with), but it’s used by the program.
Indeed, if there is anything like a font inside of them, it could be embedded within the executables.
But I wouldn’t expect a keyboard to include a font (unless it were only compatible with a single one). A keyboard normally maps a key to a character, which a font can render. The keyboard you linked says something similar:
Typing Pali on Windows requires a way to map keystrokes to Pali diacritical characters
Regarding the specific characters:
Yes, that seems to be how groff refers to them. That would be referring to the unicode U+006C and U+0323, or l and the diacritic dot underneath to produce ḷ, which can also be represented directly as U+1E37.
I’ve never used groff before, but normally in like LaTeX, you’d set the font first, telling it how to render specific characters.
Given that error, I’d guess that either you didn’t set the font or groff didn’t load the font properly (which might have another error), since groff appears to have a specific procedure for installing TTF fonts