السلام علیکم
ہے کوئی نیک بندہ جو اس نا سمھج کو سمھجائے؟
میں کافی کوشش کے باوجود اس چیز کو نہیں سمھج سکا، اگر کوئی دوست سمجھائے تو مہربانی ہوگی۔
http://fontforge.github.io/statemachine.html
The Mac State Machine Dialog
The mac uses state machines where opentype would use a contextual lookup. The example at right (with appropriate substitutions attached to it) will convert an initial or medial short-s into a long-s (for doing renaissance printing).
FontForge currently supports 4 types of state machines: contextual glyph substitution, indic rearrangement, contextual glyph insertion, and contextual kerning. The example at right is of contextual glyph substitution.
An example conditional substitution state machine is provided in the tutorial.
On the mac there are four predefined classes, one meaning the end of input, one for all glyphs not specified elsewhere, one for the magic "deleted" glyph (Apple does not always delete a glyph when asked to do so, instead it retains a special mark in the glyph stream indicating that the glyph should be deleted later), and finally a class for the end of a line of text. Any classes after this are user defined. In the example at right there are many user defined classes representing various groupings of arabic letters. Any other glyphs in the font (the digits for example) will automatically be assigned to class 1 ("{Everything Else}").
The state machine itself is shown as a two dimensional matrix of transitions, one transition for every state and class. Classes are shown at the top of the matrix, and states down the side. The transition from state 0 when given input from class 0 is shown in the upper left corner of the matrix, and so on.
When the state machine starts up it will be in one of the first two states. It will be in state 0 at the beginning of input, and in state1 when it starts at the beginning of a new line.
The 'morx' and 'mort' tables
Many of the state machines have the concept of a "marked" glyph. This is important if the desired change for a given glyph depends on what glyphs follow it. In that case when we reach an interesting glyph we "mark" it, and then, after reading a few more glyphs when we know what to do, we apply a transformation to the marked glyph.
IndicContextualInsertionKerning
In addition to a "mark"ed glyph, indic transformations also have a the concept of a "last" glyph. There are 16 transformations which may be applied the the glyphs between the "mark"ed and "last" glyphs. Suppose the glyph stream looks like
abcdef
And "a" was "mark"ed and "d" was "last" then a transition "AxD => DxA" refers to the marked glyph as "A", the last glyph as "D" and everything in between as "x", so this would change the glyph stream to
dbcaef
This can apply a substitution to the current glyph, a different substitution to the marked glyph, and it may mark the current glyph. The substitutions are indicated by 4 character tags and should be "Nested" substitutions which may be created by the Element->Char Info dialog.This can insert a string (up to 31 glyphs) before or after the current and the marked glyphs.Kerning does not have a single "mark"ed glyph, instead it can push up to 8 glyphs onto a stack, and at a later point a set of kerning values may be applied to those glyphs (so the flag which is usually indicated as "M" for mark, is here "P" for push). Once all the glyphs have been pushed, a set of kerning values may be applied. One value for each pushed glyph. This is a number which indicates how much the glyph in question should be kerned. If the glyph stream looks like:
F."
and you want to kern "." by -300, and """ by 0 em-units, then you would enter
-300 0
as kerning values.
[paste:font size="5"]Editing above for a description of what the fields mean.
If you wish to add a new state, simply edit a transition so that its next state field is the state number desired. FontForge will automatically create the state for you.
ہے کوئی نیک بندہ جو اس نا سمھج کو سمھجائے؟
میں کافی کوشش کے باوجود اس چیز کو نہیں سمھج سکا، اگر کوئی دوست سمجھائے تو مہربانی ہوگی۔
http://fontforge.github.io/statemachine.html
The Mac State Machine Dialog

FontForge currently supports 4 types of state machines: contextual glyph substitution, indic rearrangement, contextual glyph insertion, and contextual kerning. The example at right is of contextual glyph substitution.
An example conditional substitution state machine is provided in the tutorial.
On the mac there are four predefined classes, one meaning the end of input, one for all glyphs not specified elsewhere, one for the magic "deleted" glyph (Apple does not always delete a glyph when asked to do so, instead it retains a special mark in the glyph stream indicating that the glyph should be deleted later), and finally a class for the end of a line of text. Any classes after this are user defined. In the example at right there are many user defined classes representing various groupings of arabic letters. Any other glyphs in the font (the digits for example) will automatically be assigned to class 1 ("{Everything Else}").
The state machine itself is shown as a two dimensional matrix of transitions, one transition for every state and class. Classes are shown at the top of the matrix, and states down the side. The transition from state 0 when given input from class 0 is shown in the upper left corner of the matrix, and so on.
When the state machine starts up it will be in one of the first two states. It will be in state 0 at the beginning of input, and in state1 when it starts at the beginning of a new line.
The 'morx' and 'mort' tables
- On the 'kern' table (format 1)
Many of the state machines have the concept of a "marked" glyph. This is important if the desired change for a given glyph depends on what glyphs follow it. In that case when we reach an interesting glyph we "mark" it, and then, after reading a few more glyphs when we know what to do, we apply a transformation to the marked glyph.
IndicContextualInsertionKerning
In addition to a "mark"ed glyph, indic transformations also have a the concept of a "last" glyph. There are 16 transformations which may be applied the the glyphs between the "mark"ed and "last" glyphs. Suppose the glyph stream looks like
abcdef
And "a" was "mark"ed and "d" was "last" then a transition "AxD => DxA" refers to the marked glyph as "A", the last glyph as "D" and everything in between as "x", so this would change the glyph stream to
dbcaef
This can apply a substitution to the current glyph, a different substitution to the marked glyph, and it may mark the current glyph. The substitutions are indicated by 4 character tags and should be "Nested" substitutions which may be created by the Element->Char Info dialog.This can insert a string (up to 31 glyphs) before or after the current and the marked glyphs.Kerning does not have a single "mark"ed glyph, instead it can push up to 8 glyphs onto a stack, and at a later point a set of kerning values may be applied to those glyphs (so the flag which is usually indicated as "M" for mark, is here "P" for push). Once all the glyphs have been pushed, a set of kerning values may be applied. One value for each pushed glyph. This is a number which indicates how much the glyph in question should be kerned. If the glyph stream looks like:
F."
and you want to kern "." by -300, and """ by 0 em-units, then you would enter
-300 0
as kerning values.
[paste:font size="5"]Editing above for a description of what the fields mean.
If you wish to add a new state, simply edit a transition so that its next state field is the state number desired. FontForge will automatically create the state for you.