«Khotot/Quick start»: الفرق بين المراجعتين

من ويكي عربآيز
اذهب إلى: تصفح، ابحث
 
سطر 6: سطر 6:
   
 
==Get font files==
 
==Get font files==
Insted of editing TTF file directly, we are going to work on SFD files (the internal database format that FF <ref>FontForge.</ref> uses). Those files are avialable at Arabeyes CVS. You can access the files using the web interface; http://cvs.arabeyes.org/viewcvs/art/khotot/sfd , or get your local cvs copy:
+
Instead of editing TTF file directly, we are going to work on SFD files (the internal database format that FF <ref>FontForge.</ref> uses). Those files are available at Arabeyes CVS. You can access the files using the web interface; http://cvs.arabeyes.org/viewcvs/art/khotot/sfd , or get your local cvs copy:
 
<pre>
 
<pre>
 
cvs -d:pserver:anoncvs@cvs.arabeyes.org:/home/arabeyes/cvs login
 
cvs -d:pserver:anoncvs@cvs.arabeyes.org:/home/arabeyes/cvs login
سطر 17: سطر 17:
   
 
==Editing the font==
 
==Editing the font==
We are going to fix the anchor points, anchor points are helper points over the glyphs that tells the font renderer how to put to glyphs in relation to each other. In our case, we hase two types of glyphs; base glyphs like Alef (أ), Beh (ب) and so, and diacritic marks (Harakat<ref>Harakat is the small vowel marks that lay obove the chracters to indicates its pronouncation.</ref>) like Fathah (َ ) and Dammah (ُ ).
+
We are going to fix the anchor points, anchor points are helper points over the glyphs that tells the font renderer how to put to glyphs in relation to each other. In our case, we has two types of glyphs; base glyphs like Alef (أ), Beh (ب) and so, and diacritic marks (Harakat<ref>Harakat is the small vowel marks that lay above the characters to indicates its pronunciation.</ref>) like Fathah (َ ) and Dammah (ُ ).
   
Each base glyph has two anchor points one above it and called ArabicAbove, and one below it called Arabic below. Ligatures<ref>A ligature is a combination of two characters or more into one glyph, the only mandatory ligature in Arabic is Lam Alef.</ref> has anchor points for eatch component, the most common wxample is Lam Alef which has anchor points for Lam part and Alef part.
+
Each base glyph has two anchor points one above it and called ArabicAbove, and one below it called Arabic below. Ligatures<ref>A ligature is a combination of two characters or more into one glyph, the only mandatory ligature in Arabic is Lam Alef.</ref> has anchor points for each component, the most common wxample is Lam Alef which has anchor points for Lam part and Alef part.
   
 
Each diacritic mark has four anchor points, one for normal glyphs and one for ligatures, both should have the same position. Another two anchor points used for relations between diacritic marks and each other, called ArabicMark2MarkAbove and ArabicMark2MarkBelow.
 
Each diacritic mark has four anchor points, one for normal glyphs and one for ligatures, both should have the same position. Another two anchor points used for relations between diacritic marks and each other, called ArabicMark2MarkAbove and ArabicMark2MarkBelow.
   
 
===Edit Harakat===
 
===Edit Harakat===
First select Encoding -> Compact, this will get ride of empty code points and will ease navigating throwgh the font.
+
First select Encoding -> Compact, this will get ride of empty code points and will ease navigating through the font.
   
 
[[Image:FF_fathatan.png|thumb|right|Editing Fathatan glyph.]]
 
[[Image:FF_fathatan.png|thumb|right|Editing Fathatan glyph.]]
سطر 35: سطر 35:
 
''Tips'':
 
''Tips'':
 
* Use "Ctrl ]" and "Ctrl [" to move to previous and next glyphs.
 
* Use "Ctrl ]" and "Ctrl [" to move to previous and next glyphs.
* To move all anchor points in a glyph at once, double click on them until the star takes a ligh color, provided that those anchor points lay over each other.
+
* To move all anchor points in a glyph at once, double click on them until the star takes a light color, provided that those anchor points lay over each other.
   
 
==Editing base glyphs==
 
==Editing base glyphs==
Instead of editing eatch glyph seperately, we will use a nice FF dialog called Anchor Control dialog. This dialog allow editing anchor points and noting its effect on fly, which allow tune adjustment of the position of eatch point.
+
Instead of editing each glyph separately, we will use a nice FF dialog called Anchor Control dialog. This dialog allow editing anchor points and noting its effect on fly, which allow tune adjustment of the position of each point.
   
 
Go to Element -> Font Info -> Lookups -> GPOS , choose one of the three lookup tables:
 
Go to Element -> Font Info -> Lookups -> GPOS , choose one of the three lookup tables:
* "'mark' Mark to base in Arabic lookup 0" : for marks obove ordinary base glyphs.
+
* "'mark' Mark to base in Arabic lookup 0" : for marks above ordinary base glyphs.
* "'mark' Mark to ligature in Arabic lookup 1" : or marks obove ligatures.
+
* "'mark' Mark to ligature in Arabic lookup 1" : or marks above ligatures.
 
* "'mkmk' Mark to Mark in Arabic lookup 2" : for the realation between marks and each other.
 
* "'mkmk' Mark to Mark in Arabic lookup 2" : for the realation between marks and each other.
   
سطر 52: سطر 52:
   
   
---
+
-----
 
{{references}}
 
{{references}}

نسخة 19:59، 31 يوليو 2007

Requirements

  • FontForge: FontForge is our main font editing and development software, it is a free software. You will need version 20070723 at least. [1] Arlier version lacks some fetures that we relay on.
  • ...

Get font files

Instead of editing TTF file directly, we are going to work on SFD files (the internal database format that FF [2] uses). Those files are available at Arabeyes CVS. You can access the files using the web interface; http://cvs.arabeyes.org/viewcvs/art/khotot/sfd , or get your local cvs copy:

cvs -d:pserver:anoncvs@cvs.arabeyes.org:/home/arabeyes/cvs login

The password is 'anoncvs' (just like the login name).

 
cvs -z3 -d:pserver:anoncvs@cvs.arabeyes.org:/home/arabeyes/cvs co art/khotot

NOTE: this is about 30MB download.

Editing the font

We are going to fix the anchor points, anchor points are helper points over the glyphs that tells the font renderer how to put to glyphs in relation to each other. In our case, we has two types of glyphs; base glyphs like Alef (أ), Beh (ب) and so, and diacritic marks (Harakat[3]) like Fathah (َ ) and Dammah (ُ ).

Each base glyph has two anchor points one above it and called ArabicAbove, and one below it called Arabic below. Ligatures[4] has anchor points for each component, the most common wxample is Lam Alef which has anchor points for Lam part and Alef part.

Each diacritic mark has four anchor points, one for normal glyphs and one for ligatures, both should have the same position. Another two anchor points used for relations between diacritic marks and each other, called ArabicMark2MarkAbove and ArabicMark2MarkBelow.

Edit Harakat

First select Encoding -> Compact, this will get ride of empty code points and will ease navigating through the font.

Editing Fathatan glyph.

At first we will edit anchor points in diacritic (Harakat) glyphs, in "View -> Go To" type uni064b, this will take you to Fathatan glyph, click on it then move the anchor points (the blue star) to just below it, see the screen shot.

Repeat this with other marks, but remember in case of Kasrah and Kasratan to put the anchor points just above the marks.

Shaddah is a special case, its ArabicMark2MarkAbove point should be above it as this point will used to place marks like Fathah and Dammah above Shaddah, other points should be bellow it.

Tips:

  • Use "Ctrl ]" and "Ctrl [" to move to previous and next glyphs.
  • To move all anchor points in a glyph at once, double click on them until the star takes a light color, provided that those anchor points lay over each other.

Editing base glyphs

Instead of editing each glyph separately, we will use a nice FF dialog called Anchor Control dialog. This dialog allow editing anchor points and noting its effect on fly, which allow tune adjustment of the position of each point.

Go to Element -> Font Info -> Lookups -> GPOS , choose one of the three lookup tables:

  • "'mark' Mark to base in Arabic lookup 0" : for marks above ordinary base glyphs.
  • "'mark' Mark to ligature in Arabic lookup 1" : or marks above ligatures.
  • "'mkmk' Mark to Mark in Arabic lookup 2" : for the realation between marks and each other.
Anchor control dialog

click on the [+] to open its subtables, select a subtable then click on "Edit Data" button from the side pan. From the dialog select an anchor point then click on Anchor control button.

From anchor control dialog you can adjust anchor points as appropriate and see its effect, use Page Up and Page Down to navigate through glyphs.



  1. FontForge can be found in its web page, fontforge.sourceforge.net.
  2. FontForge.
  3. Harakat is the small vowel marks that lay above the characters to indicates its pronunciation.
  4. A ligature is a combination of two characters or more into one glyph, the only mandatory ligature in Arabic is Lam Alef.