Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove characters from a font file?

i've downloaded the DejaVu open source font and want to use it ad a WebFont, but even when converting it, i get a large file, and because the website i'll use will be only in few languages (arabic, french, amazigh) then, i dont need some characters.

so is there a way to browse the font file and delete the unnecessary range of unicode characters that i'll not need?

like image 970
Abdelouahab Pp Avatar asked Oct 19 '12 14:10

Abdelouahab Pp


People also ask

How do I remove unwanted glyphs from a font?

To remove glyphs from the font, in the Font window or Font Map panel: Select the glyphs that you want to remove. Select the Delete command from the Edit menu or press the Backspace (or Del ) key on the keyboard. A dialog box appears asking you if you are sure that you want to delete the glyphs.

How do I see all the characters in a font file?

Windows' Character Map (found in the Programs > Accessories > System Tools menu) shows all the characters in a font in the form of a scrollable grid.

How do you remove a specific character from a text file in Python?

Using str. replace() , we can replace a specific character. If we want to remove that specific character, replace that character with an empty string.


1 Answers

Using FontForge, you may open Element->Font Info->Unicode Ranges. You will see all available ranges and you can select a whole Unicode range with a single click. Then, you can tune your selection and delete using Encoding->Detach & Remove Glyphs.

Also, you can use Edit->Select->Select by Script.

like image 186
Mohammad Alhashash Avatar answered Oct 01 '22 17:10

Mohammad Alhashash