Changing the English characters of Hebrew fonts.

Changing the English characters of Hebrew fonts.

Matan Ziv-Av matan at svgalib.org
Tue Feb 24 15:43:20 IST 2009


On Tue, 24 Feb 2009, Dotan Cohen wrote:

> 2009/2/24 Matan Ziv-Av <matan at svgalib.org>:
>> On Tue, 24 Feb 2009, Dotan Cohen wrote:
>>
>>> I have many nice Hebrew fonts that I would like to use for my system
>>> font, however, they all have very ugly English letters. Is there a way
>>> to change the font that will be used in English in these Hebrew fonts?
>>
>> You can use fontforge to generate a new font file with Hebrew letters from
>> one file and the rest from another. Fontforge supports scripting, so you
>> don't even need to use the GUI. See here for script language reference and
>> simple tutorial:
>>
>> http://fontforge.sourceforge.net/scripting.html
>> http://fontforge.sourceforge.net/scripting-tutorial.html
>>
>
> Thanks, Matan. It looks like those links contain the info I need, if
> only I knew to script in Python _and_ was familiar with the way
> FontForge works. Maybe that is a project for another lifetime...

You don't need that much. Here's a script that takes the letters from a 
hebrew fonts and adds them to another font:

Open("NachlieliCLM-BoldOblique.pfa")
SelectAll()
Scale(200)
Generate("tmp.ttf")
Open("SwaBI4nh.ttf")
MergeFonts("tmp.ttf")
Generate("SwaBI4nh-h.ttf")

There are two things you need to change:
Easy - the name of the fonts
A bit harder - change SelectAll with a function that only selects hebrew 
letters. I used SelectAll since the Hebrew font I used only has Hebrew 
letters.


-- 
Matan Ziv-Av.                         matan at svgalib.org





More information about the Linux-il mailing list