UniBible - A Multilingual Bible Reader for the Palm
UniBible Home Screenshots Downloads Developers Unbound Bible Biola University
font structure for unicode-glib / unibible

Making Your Own Fonts
You can download some Java programs to help you with creating your own fonts. You will need Java, and Perl would be helpful. If you are not using Windows, you will have to translate the .bat files into a shell script that your computer can use. These programs are provided as-is; they are not polished products, but they can be helpful.
  • Some of the programs try to convert a Windows/Mac font into a Palm font, or into a .gif image.
  • Some of them convert a .gif image in a specific format into a Palm font, or a Palm font into a .gif image.
  • Converting to and from a .gif file is useful because it means you can create and edit fonts without having to buy a font program.
  • And you can try to convert a lo-res font into a high-res (double density) font.


Download Font Utilities SourceForge


UniF Font File Format
UniBible (and other applications using the Unicode-GLib library) use a font collection database format.

The Type should be UniF and the Creator should also be UniF.

Each record in the database should contain:

  1. A UInt16 ranging from 0x0000 to 0x0FFF, indicating which 256 characters from the Unicode range that particular font represents.
    • Basic Latin and Latin-1 (U0000-U00FF) would be represented by 0x0000.
    • Arabic (U0600-U06FF) would be represented by 0x0006.
    • Gothic (contained within U10300-U103FF) would be represented by 0x0103.
  2. Data for a normal PalmOS font , either a low density font, or a high (double) density font. Please note that the hi-res fonts will only work with the hi-res font support from PalmOS. This does not include Sony's proprietary hi-res font framework.

The Unicode-GLib library will open all the UniF font collections on your Palm or on memory cards if it can, so you an have multiple .pdb files with different font ranges in them. For example, note that the Chinese fonts are a separate download.

However, if there is more than one version of the same font range (e.g. 0x0000, Basic Latin and Latin-1), one of those will be chosen at random.


Private Use Area
The following ranges of the Unicode Private Use Areas are currently being used by the UniL-Unicode Library.
RangeUsed For
UE000-UE0FFSyriac Shaping
UE100-UE3FFKorean Stacking for consonant + vowel ( + final consonant)
UE400-UE4FFTamil Shaping for consonant + vowel forms
UE500-UE5FFArabic Shaping for glyphs with two shaping forms; obligatory ligatures; combining mark variants
UE600-UE7FFArabic Shaping for glyphs with four shaping forms


Syriac
To find the glyph code of a Syriac consonant, do the following:

  • Take the Syriac character code (U0710 - U072F, 0x710 - 0x72F)
  • Subtract 0x710
  • Multiply by 4
  • Add a number to indicate the contextual form:
    • Add 0 for the Isolated Form
    • Add 1 for the Final Form
    • Add 2 for the Initial Form
    • Add 3 for the Medial Form
  • Add 0xE000


Korean
Korean is written with an alphabet (not a syllabary like Japanese, nor a logographic script like Chinese). However, Korean combines two or three letters together in the same square space, and those two or three letters end up representing a syllable. Because of this, Unicode defines a glyph for every legal combination of these two or three Korean letters. Although Unicode-GLib could support this set of characters, it takes up a lot of unneeded memory space to store all the needed fonts. Because of this, it is better to provide Unicode text that is decomposed into the base Korean consonants and vowels. Unicode-GLib then uses the following information to create the required glyph out of two or three overlapping characters.

  • The valid combinations in Korean always start with a consonant, followed by a vowel, followed by an optional consonant.
  • Vowels come in three basic shapes:
    1. horizontal line (1 and 2b below)
    2. vertical line (3 and 4 below)
    3. horizontal line followed by a vertical line to the right (2a and 5 below)
  • Consonants come in one basic shape: square. This shape changes depending on which vowel is in the syllable, and if the syllable ends in the optional consonant or not.
  • The rule for combining consonant, vowel, (consonant) is to stack them from top to bottom, resulting in six basic shapes.

    (the C-like characters represent consonants, the lines _ , | , _| represent vowels)
  • For simplification purposes, Unicode-GLib assumes the form of the initial consonant in examples 2a and 2b are the same.
  • This leaves us with:
    • Each consonant has 5 syllable-initial consonant forms (the top consonant in 1, 2a/b, 3, 4, and 5)
    • Each consonant has 1 final consonant form (the same form in 2b, 4, and 5)
    • Each vowel has 2 forms: big & small:
      • Vertical vowels: 1 & 2b
      • Horizontal vowels: 3 & 4
      • L-shaped vowels (horizontal + vertical): 2a & 5
  • The Unicode font range UE100-UE2E1 is reserved to represent the initial consonants in Korean. Each consonant gets 5 glyphs, representing, in order, the forms 1, 2a/b, 3, 4, and 5 from the figure above. Right now only UE100-UE15E have fonts created, for the characters in use in modern Korean.
  • The Unicode font range UE2E2-UE36F is reserved to represent the vowels in Korean. Each vowel gets 2 glyphs, representing first the "big" and then the "small" form of the vowel. Right now only UE2E2-UE30B have fonts created, for the characters in use in modern Korean.
  • The Unicode font range UE370-UE3FF is reserved to represent the final consonants in Korean. Each consonant gets 1 glyph. Right now only UE370-UE38A have fonts created, for the characters in use in modern Korean.


Tamil
Here are two special consonant combinations for Tamil:
DescriptionTamil CharactersNew Glyph
Ka + Virama + Ssa = KssaU0B95 + U0BCD + U0BB7UE4FD
R + ViramaU0BB0 + U0BCDUE4FF

Tamil needs special glyphs for different consonant+vowel combinations. These are stored in UE400-UE4FF.

To find the character code of the glyph used for display, find the value of the consonant and the value of the vowel in the table below. The formula for finding the glyph in the font is then:
0xE400 + (CONSONANT*11) + VOWEL
 VOWELS
C
O
N
S
O
N
A
N
T
S
Character   U0BBEU0BBFU0BC0U0BC1U0BC2U0BC6U0BC7U0BC8U0BCAU0BCBU0BCC
  Value 012345678910
U0B950UE400. . .UE40A
U0B991UE40B. . .UE415
U0B9A2UE416. . .UE420
U0B9C3UE421. . .UE42B
U0B9E4UE42C. . .UE436
U0B9F5UE437. . .UE441
U0BA36UE442. . .UE44C
U0BA47UE44D. . .UE457
U0BA88UE458. . .UE462
U0BA99UE463. . .UE46D
U0BAA10UE46E. . .UE478
U0BAE11UE479. . .UE483
U0BAF12UE484. . .UE48E
U0BB013UE48F. . .UE499
U0BB114UE49A. . .UE4A4
U0BB215UE4A5. . .UE4AF
U0BB316UE4B0. . .UE4BA
U0BB417UE4BB. . .UE4C5
U0BB518UE4C6. . .UE4D0
U0BB719UE4D1. . .UE4DB
U0BB820UE4DC. . .UE4E6
U0BB921UE4E7. . .UE4F1
UE4FD*22UE4F2. . .UE4FC
*UE4FD is mentioned above as being formed from U0B95 + U0BCD + U0BB7


Arabic
You should always encode your Arabic text in a UniBible file with characters in the U0600-U07FF range. However, when the text is presented, Unicode-GLib uses glyphs from Private Use Area UE500-UE7FF (as well as some characters from U0600-U06FF) to display your text to the screen.

The range of characters from UE500-UE56F is used for Arabic characters that have two shaping forms: isolated and final. Each pair has the isolated form followed by the final form.
Arabic CharacterIsolated GlyphFinal Glyph
U0622UE500UE501
U0623UE502UE503
U0624UE504UE505
U0625UE506UE507
U0627UE508UE509
U0629UE50AUE50B
U062FUE50CUE50D
U0630UE50EUE50F
U0631UE510UE511
U0632UE512UE513
U0648UE514UE515
U0671UE516UE517
U0672UE518UE519
U0673UE51AUE51B
U0675UE51CUE51D
U0676UE51EUE51F
U0677UE520UE521
U0688UE522UE523
U0689UE524UE525
U068AUE526UE527
U068BUE528UE529
U068CUE52AUE52B
U068DUE52CUE52D
U068EUE52EUE52F
U068FUE530UE531
U0690UE532UE533
U0691UE534UE535
U0692UE536UE537
U0693UE538UE539
U0694UE53AUE53B
U0695UE53CUE53D
U0696UE53EUE53F
U0697UE540UE541
U0698UE542UE543
U0699UE544UE545
U06C0UE546UE547
U06C2UE548UE549
U06C3UE54AUE54B
U06C4UE54CUE54D
U06C5UE54EUE54F
U06C6UE550UE551
U06C7UE552UE553
U06C8UE554UE555
U06C9UE556UE557
U06CAUE558UE559
U06CBUE55AUE55B
U06CDUE55CUE55D
U06CFUE55EUE55F
U06D2UE560UE561
U06D3UE562UE563
U06D5UE564UE565
U06EEUE566UE567
U06EFUE568UE569
U0759UE56AUE56B
U075AUE56CUE56D
U075BUE56EUE56F

The range of characters from UE570-UE583 is used for creating the obligatory lam-aleph ligature for the various aleph-like and lam-like characters. All forms of a lam-like character plus aleph (U0627) are represented as glyphs in UE570-UE57B. The various aleph-like characters are created by combining a diacritic from UE57C-UE583 with the lam-like + aleph ligature. Each ligature has two forms: isolated and final.
Arabic LigatureIsolated GlyphFinal Glyph
U0644 + U0627UE570 + UE57FUE571 + UE57F
U06B5 + U0627UE572 + UE57FUE572 + UE57F
U06B6 + U0627UE574 + UE57FUE573 + UE57F
U06B7 + U0627UE576 + UE57FUE574 + UE57F
U06B8 + U0627UE578 + UE57FUE575 + UE57F
U076A + U0627UE57A + UE57FUE576 + UE57F
U0644 + U0622UE570 + UE57CUE571 + UE57C
U06B5 + U0622UE572 + UE57CUE572 + UE57C
U06B6 + U0622UE574 + UE57CUE573 + UE57C
U06B7 + U0622UE576 + UE57CUE574 + UE57C
U06B8 + U0622UE578 + UE57CUE575 + UE57C
U076A + U0622UE57A + UE57CUE576 + UE57C
U0644 + U0623UE570 + UE57DUE571 + UE57D
U06B5 + U0623UE572 + UE57DUE572 + UE57D
U06B6 + U0623UE574 + UE57DUE573 + UE57D
U06B7 + U0623UE576 + UE57DUE574 + UE57D
U06B8 + U0623UE578 + UE57DUE575 + UE57D
U076A + U0623UE57A + UE57DUE576 + UE57D
U0644 + U0625UE570 + UE57EUE571 + UE57E
U06B5 + U0625UE572 + UE57EUE572 + UE57E
U06B6 + U0625UE574 + UE57EUE573 + UE57E
U06B7 + U0625UE576 + UE57EUE574 + UE57E
U06B8 + U0625UE578 + UE57EUE575 + UE57E
U076A + U0625UE57A + UE57EUE576 + UE57E
U0644 + U0671UE570 + UE580UE571 + UE580
U06B5 + U0671UE572 + UE580UE572 + UE580
U06B6 + U0671UE574 + UE580UE573 + UE580
U06B7 + U0671UE576 + UE580UE574 + UE580
U06B8 + U0671UE578 + UE580UE575 + UE580
U076A + U0671UE57A + UE580UE576 + UE580
U0644 + U0672UE570 + UE581UE571 + UE581
U06B5 + U0672UE572 + UE581UE572 + UE581
U06B6 + U0672UE574 + UE581UE573 + UE581
U06B7 + U0672UE576 + UE581UE574 + UE581
U06B8 + U0672UE578 + UE581UE575 + UE581
U076A + U0672UE57A + UE581UE576 + UE581
U0644 + U0673UE570 + UE582UE571 + UE582
U06B5 + U0673UE572 + UE582UE572 + UE582
U06B6 + U0673UE574 + UE582UE573 + UE582
U06B7 + U0673UE576 + UE582UE574 + UE582
U06B8 + U0673UE578 + UE582UE575 + UE582
U076A + U0673UE57A + UE582UE576 + UE582
U0644 + U0675UE570 + UE583UE571 + UE583
U06B5 + U0675UE572 + UE583UE572 + UE583
U06B6 + U0675UE574 + UE583UE573 + UE583
U06B7 + U0675UE576 + UE583UE574 + UE583
U06B8 + U0675UE578 + UE583UE575 + UE583
U076A + U0675UE57A + UE583UE576 + UE583

The two characters UE584 and UE585 are used in a special way. These characters are not used to display a glyph. Rather, the width of each character is used to set a preference value for the font.

  • Width of UE584: This value is used to determine how many pixels an Above Combining Character is moved down when it occurs with an Arabic base character that does not have ascenders.
  • Width of UE585: This value is used to determine how many pixels a Below Combining Character is moved up when it ioccurs with an Arabic base character that does not have descenders, and is not in a final or isolated form.

Combining characters that can occur with Shadda (U0651) are placed in UE586-UE594. Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
U0651 + U064BUE586Shadda + Fathatan
U0651 + U064CUE587Shadda + Dammatan
U0651 + U064EUE588Shadda + Fatha
U0651 + U064FUE589Shadda + Damma
U0651 + U0652UE58AShadda + Sukun
U0651 + U0657UE58BShadda + Inverted Damma
U0651 + U0658UE58CShadda + Nasal Marker
U0651 + U0659UE58DShadda + Zwarakay Vowel
U0651 + U065AUE58EShadda + Small V Vowel Mark
U0651 + U065BUE58FShadda + Inverted Small V Vowel Mark
U0651 + U065DUE590Shadda + Turned Damma
U0651 + U065EUE591Shadda + Dotted Fatha
U0651 + U06E1UE592Shadda + Jasm
U0651 + U06E4UE593Shadda + Small High Madde
U0651 + U0670UE594Shadda + Superscript Alef

The range of characters from UE600-UE7C7 is used for Arabic characters that have four shaping forms: isolated, final, initial, and medial.
Arabic CharacterIsolated GlyphFinal GlyphInitial GlyphMedial Glyph
U0626UE600UE601UE602UE603
U0628UE604UE605UE606UE607
U062AUE608UE609UE60AUE60B
U062BUE60CUE60DUE60EUE60F
U062CUE610UE611UE612UE613
U062DUE614UE615UE616UE617
U062EUE618UE619UE61AUE61B
U0633UE61CUE61DUE61EUE61F
U0634UE620UE621UE622UE623
U0635UE624UE625UE626UE627
U0636UE628UE629UE62AUE62B
U0637UE62CUE62DUE62EUE62F
U0638UE630UE631UE632UE633
U0639UE634UE635UE636UE637
U063AUE638UE639UE63AUE63B
U0640UE63CUE63DUE63EUE63F
U0641UE640UE641UE642UE643
U0642UE644UE645UE646UE647
U0643UE648UE649UE64AUE64B
U0644UE64CUE64DUE64EUE64F
U0645UE650UE651UE652UE653
U0646UE654UE655UE656UE657
U0647UE658UE659UE65AUE65B
U0649UE65CUE65DUE65EUE65F
U064AUE660UE661UE662UE663
U066EUE664UE665UE666UE667
U066FUE668UE669UE66AUE66B
U0678UE66CUE66DUE66EUE66F
U0679UE670UE671UE672UE673
U067AUE674UE675UE676UE677
U067BUE678UE679UE67AUE67B
U067CUE67CUE67DUE67EUE67F
U067DUE680UE681UE682UE683
U067EUE684UE685UE686UE687
U067FUE688UE689UE68AUE68B
U0680UE68CUE68DUE68EUE68F
U0681UE690UE691UE692UE693
U0682UE694UE695UE696UE697
U0683UE698UE699UE69AUE69B
U0684UE69CUE69DUE69EUE69F
U0685UE6A0UE6A1UE6A2UE6A3
U0686UE6A4UE6A5UE6A6UE6A7
U0687UE6A8UE6A9UE6AAUE6AB
U069AUE6ACUE6ADUE6AEUE6AF
U069BUE6B0UE6B1UE6B2UE6B3
U069CUE6B4UE6B5UE6B6UE6B7
U069DUE6B8UE6B9UE6BAUE6BB
U069EUE6BCUE6BDUE6BEUE6BF
U069FUE6C0UE6C1UE6C2UE6C3
U06A0UE6C4UE6C5UE6C6UE6C7
U06A1UE6C8UE6C9UE6CAUE6CB
U06A2UE6CCUE6CDUE6CEUE6CF
U06A3UE6D0UE6D1UE6D2UE6D3
U06A4UE6D4UE6D5UE6D6UE6D7
U06A5UE6D8UE6D9UE6DAUE6DB
U06A6UE6DCUE6DDUE6DEUE6DF
U06A7UE6E0UE6E1UE6E2UE6E3
U06A8UE6E4UE6E5UE6E6UE6E7
U06A9UE6E8UE6E9UE6EAUE6EB
U06AAUE6ECUE6EDUE6EEUE6EF
U06ABUE6F0UE6F1UE6F2UE6F3
U06ACUE6F4UE6F5UE6F6UE6F7
U06ADUE6F8UE6F9UE6FAUE6FB
U06AEUE6FCUE6FDUE6FEUE6FF
U06AFUE700UE701UE702UE703
U06B0UE704UE705UE706UE707
U06B1UE708UE709UE70AUE70B
U06B2UE70CUE70DUE70EUE70F
U06B3UE710UE711UE712UE713
U06B4UE714UE715UE716UE717
U06B5UE718UE719UE71AUE71B
U06B6UE71CUE71DUE71EUE71F
U06B7UE720UE721UE722UE723
U06B8UE724UE725UE726UE727
U06B9UE728UE729UE72AUE72B
U06BAUE72CUE72DUE72EUE72F
U06BBUE730UE731UE732UE733
U06BCUE734UE735UE736UE737
U06BDUE738UE739UE73AUE73B
U06BEUE73CUE73DUE73EUE73F
U06BFUE740UE741UE742UE743
U06C1UE744UE745UE746UE747
U06CCUE748UE749UE74AUE74B
U06CEUE74CUE74DUE74EUE74F
U06D0UE750UE751UE752UE753
U06D1UE754UE755UE756UE757
U06FAUE758UE759UE75AUE75B
U06FBUE75CUE75DUE75EUE75F
U06FCUE760UE761UE762UE763
U06FFUE764UE765UE766UE767
U0750UE768UE769UE76AUE76B
U0751UE76CUE76DUE76EUE76F
U0752UE770UE771UE772UE773
U0753UE774UE775UE776UE777
U0754UE778UE779UE77AUE77B
U0755UE77CUE77DUE77EUE77F
U0756UE780UE781UE782UE783
U0757UE784UE785UE786UE787
U0758UE788UE789UE78AUE78B
U075CUE78CUE78DUE78EUE78F
U075DUE790UE791UE792UE793
U075EUE794UE795UE796UE797
U075FUE798UE799UE79AUE79B
U0760UE79CUE79DUE79EUE79F
U0761UE7A0UE7A1UE7A2UE7A3
U0762UE7A4UE7A5UE7A6UE7A7
U0763UE7A8UE7A9UE7AAUE7AB
U0764UE7ACUE7ADUE7AEUE7AF
U0765UE7B0UE7B1UE7B2UE7B3
U0766UE7B4UE7B5UE7B6UE7B7
U0767UE7B8UE7B9UE7BAUE7BB
U0768UE7BCUE7BDUE7BEUE7BF
U0769UE7C0UE7C1UE7C2UE7C3
U076AUE7C4UE7C5UE7C6UE7C7