User`s manual
TransType Pro
100
The Programs Structure
The next required string following the program name is:
from FL import *
This string is mandatory and should be included in every macro used with
TransType Pro.
The remaining part of the program has the following structure:
<…>
def tr_init():
<…>
return 0
def tr_process(font):
<…>
return 0
def tr_done():
<…>
return 0
The tr_init procedure is called every time you press the Convert button that
is once before the first font will be converted.
The tr_ process(font) procedure is called before the current font
font is
converted and saved in the chosen format. Therefore this procedure is
executed as many times as many fonts you have in the Destination fonts
list. Normally this procedure should return zero value; but if it returns 1
the font will not be saved; and if it returns 2 the font will not be reencoded.
The value of -1 will terminate the whole conversion process.
And finally, the tr_done procedure is called once after all fonts are
converted and saved.
Please open our demo.py program in any text-editing application and
consider it as an example.