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:
- 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.
- 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.
| Range | Used For |
| UE000-UE0FF | Syriac Shaping |
| UE100-UE3FF | Korean Stacking for consonant + vowel ( + final consonant) |
| UE400-UE4FF | Tamil Shaping for consonant + vowel forms |
| UE500-UE5FF | Arabic Shaping for glyphs with two shaping forms; obligatory ligatures; combining mark variants |
| UE600-UE7FF | Arabic 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:
- horizontal line (1 and 2b below)
- vertical line (3 and 4 below)
- 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:
| Description | Tamil Characters | New Glyph |
| Ka + Virama + Ssa = Kssa | U0B95 + U0BCD + U0BB7 | UE4FD |
| R + Virama | U0BB0 + U0BCD | UE4FF |
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 |
|
U0BBE | U0BBF | U0BC0 | U0BC1 | U0BC2 | U0BC6 | U0BC7 | U0BC8 | U0BCA | U0BCB | U0BCC |
| |
Value |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| U0B95 | 0 | UE400 | . . . | UE40A |
| U0B99 | 1 | UE40B | . . . | UE415 |
| U0B9A | 2 | UE416 | . . . | UE420 |
| U0B9C | 3 | UE421 | . . . | UE42B |
| U0B9E | 4 | UE42C | . . . | UE436 |
| U0B9F | 5 | UE437 | . . . | UE441 |
| U0BA3 | 6 | UE442 | . . . | UE44C |
| U0BA4 | 7 | UE44D | . . . | UE457 |
| U0BA8 | 8 | UE458 | . . . | UE462 |
| U0BA9 | 9 | UE463 | . . . | UE46D |
| U0BAA | 10 | UE46E | . . . | UE478 |
| U0BAE | 11 | UE479 | . . . | UE483 |
| U0BAF | 12 | UE484 | . . . | UE48E |
| U0BB0 | 13 | UE48F | . . . | UE499 |
| U0BB1 | 14 | UE49A | . . . | UE4A4 |
| U0BB2 | 15 | UE4A5 | . . . | UE4AF |
| U0BB3 | 16 | UE4B0 | . . . | UE4BA |
| U0BB4 | 17 | UE4BB | . . . | UE4C5 |
| U0BB5 | 18 | UE4C6 | . . . | UE4D0 |
| U0BB7 | 19 | UE4D1 | . . . | UE4DB |
| U0BB8 | 20 | UE4DC | . . . | UE4E6 |
| U0BB9 | 21 | UE4E7 | . . . | UE4F1 |
| UE4FD* | 22 | UE4F2 | . . . | 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 Character | Isolated Glyph | Final Glyph |
| U0622 | UE500 | UE501 |
| U0623 | UE502 | UE503 |
| U0624 | UE504 | UE505 |
| U0625 | UE506 | UE507 |
| U0627 | UE508 | UE509 |
| U0629 | UE50A | UE50B |
| U062F | UE50C | UE50D |
| U0630 | UE50E | UE50F |
| U0631 | UE510 | UE511 |
| U0632 | UE512 | UE513 |
| U0648 | UE514 | UE515 |
| U0671 | UE516 | UE517 |
| U0672 | UE518 | UE519 |
| U0673 | UE51A | UE51B |
| U0675 | UE51C | UE51D |
| U0676 | UE51E | UE51F |
| U0677 | UE520 | UE521 |
| U0688 | UE522 | UE523 |
| U0689 | UE524 | UE525 |
| U068A | UE526 | UE527 |
| U068B | UE528 | UE529 |
| U068C | UE52A | UE52B |
| U068D | UE52C | UE52D |
| U068E | UE52E | UE52F |
| U068F | UE530 | UE531 |
| U0690 | UE532 | UE533 |
| U0691 | UE534 | UE535 |
| U0692 | UE536 | UE537 |
| U0693 | UE538 | UE539 |
| U0694 | UE53A | UE53B |
| U0695 | UE53C | UE53D |
| U0696 | UE53E | UE53F |
| U0697 | UE540 | UE541 |
| U0698 | UE542 | UE543 |
| U0699 | UE544 | UE545 |
| U06C0 | UE546 | UE547 |
| U06C2 | UE548 | UE549 |
| U06C3 | UE54A | UE54B |
| U06C4 | UE54C | UE54D |
| U06C5 | UE54E | UE54F |
| U06C6 | UE550 | UE551 |
| U06C7 | UE552 | UE553 |
| U06C8 | UE554 | UE555 |
| U06C9 | UE556 | UE557 |
| U06CA | UE558 | UE559 |
| U06CB | UE55A | UE55B |
| U06CD | UE55C | UE55D |
| U06CF | UE55E | UE55F |
| U06D2 | UE560 | UE561 |
| U06D3 | UE562 | UE563 |
| U06D5 | UE564 | UE565 |
| U06EE | UE566 | UE567 |
| U06EF | UE568 | UE569 |
| U0759 | UE56A | UE56B |
| U075A | UE56C | UE56D |
| U075B | UE56E | UE56F |
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 Ligature | Isolated Glyph | Final Glyph |
| U0644 + U0627 | UE570 + UE57F | UE571 + UE57F |
| U06B5 + U0627 | UE572 + UE57F | UE572 + UE57F |
| U06B6 + U0627 | UE574 + UE57F | UE573 + UE57F |
| U06B7 + U0627 | UE576 + UE57F | UE574 + UE57F |
| U06B8 + U0627 | UE578 + UE57F | UE575 + UE57F |
| U076A + U0627 | UE57A + UE57F | UE576 + UE57F |
| U0644 + U0622 | UE570 + UE57C | UE571 + UE57C |
| U06B5 + U0622 | UE572 + UE57C | UE572 + UE57C |
| U06B6 + U0622 | UE574 + UE57C | UE573 + UE57C |
| U06B7 + U0622 | UE576 + UE57C | UE574 + UE57C |
| U06B8 + U0622 | UE578 + UE57C | UE575 + UE57C |
| U076A + U0622 | UE57A + UE57C | UE576 + UE57C |
| U0644 + U0623 | UE570 + UE57D | UE571 + UE57D |
| U06B5 + U0623 | UE572 + UE57D | UE572 + UE57D |
| U06B6 + U0623 | UE574 + UE57D | UE573 + UE57D |
| U06B7 + U0623 | UE576 + UE57D | UE574 + UE57D |
| U06B8 + U0623 | UE578 + UE57D | UE575 + UE57D |
| U076A + U0623 | UE57A + UE57D | UE576 + UE57D |
| U0644 + U0625 | UE570 + UE57E | UE571 + UE57E |
| U06B5 + U0625 | UE572 + UE57E | UE572 + UE57E |
| U06B6 + U0625 | UE574 + UE57E | UE573 + UE57E |
| U06B7 + U0625 | UE576 + UE57E | UE574 + UE57E |
| U06B8 + U0625 | UE578 + UE57E | UE575 + UE57E |
| U076A + U0625 | UE57A + UE57E | UE576 + UE57E |
| U0644 + U0671 | UE570 + UE580 | UE571 + UE580 |
| U06B5 + U0671 | UE572 + UE580 | UE572 + UE580 |
| U06B6 + U0671 | UE574 + UE580 | UE573 + UE580 |
| U06B7 + U0671 | UE576 + UE580 | UE574 + UE580 |
| U06B8 + U0671 | UE578 + UE580 | UE575 + UE580 |
| U076A + U0671 | UE57A + UE580 | UE576 + UE580 |
| U0644 + U0672 | UE570 + UE581 | UE571 + UE581 |
| U06B5 + U0672 | UE572 + UE581 | UE572 + UE581 |
| U06B6 + U0672 | UE574 + UE581 | UE573 + UE581 |
| U06B7 + U0672 | UE576 + UE581 | UE574 + UE581 |
| U06B8 + U0672 | UE578 + UE581 | UE575 + UE581 |
| U076A + U0672 | UE57A + UE581 | UE576 + UE581 |
| U0644 + U0673 | UE570 + UE582 | UE571 + UE582 |
| U06B5 + U0673 | UE572 + UE582 | UE572 + UE582 |
| U06B6 + U0673 | UE574 + UE582 | UE573 + UE582 |
| U06B7 + U0673 | UE576 + UE582 | UE574 + UE582 |
| U06B8 + U0673 | UE578 + UE582 | UE575 + UE582 |
| U076A + U0673 | UE57A + UE582 | UE576 + UE582 |
| U0644 + U0675 | UE570 + UE583 | UE571 + UE583 |
| U06B5 + U0675 | UE572 + UE583 | UE572 + UE583 |
| U06B6 + U0675 | UE574 + UE583 | UE573 + UE583 |
| U06B7 + U0675 | UE576 + UE583 | UE574 + UE583 |
| U06B8 + U0675 | UE578 + UE583 | UE575 + UE583 |
| U076A + U0675 | UE57A + UE583 | UE576 + 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 + U064B | UE586 | Shadda + Fathatan |
| U0651 + U064C | UE587 | Shadda + Dammatan |
| U0651 + U064E | UE588 | Shadda + Fatha |
| U0651 + U064F | UE589 | Shadda + Damma |
| U0651 + U0652 | UE58A | Shadda + Sukun |
| U0651 + U0657 | UE58B | Shadda + Inverted Damma |
| U0651 + U0658 | UE58C | Shadda + Nasal Marker |
| U0651 + U0659 | UE58D | Shadda + Zwarakay Vowel |
| U0651 + U065A | UE58E | Shadda + Small V Vowel Mark |
| U0651 + U065B | UE58F | Shadda + Inverted Small V Vowel Mark |
| U0651 + U065D | UE590 | Shadda + Turned Damma |
| U0651 + U065E | UE591 | Shadda + Dotted Fatha |
| U0651 + U06E1 | UE592 | Shadda + Jasm |
| U0651 + U06E4 | UE593 | Shadda + Small High Madde |
| U0651 + U0670 | UE594 | Shadda + 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 Character | Isolated Glyph | Final Glyph | Initial Glyph | Medial Glyph |
| U0626 | UE600 | UE601 | UE602 | UE603 |
| U0628 | UE604 | UE605 | UE606 | UE607 |
| U062A | UE608 | UE609 | UE60A | UE60B |
| U062B | UE60C | UE60D | UE60E | UE60F |
| U062C | UE610 | UE611 | UE612 | UE613 |
| U062D | UE614 | UE615 | UE616 | UE617 |
| U062E | UE618 | UE619 | UE61A | UE61B |
| U0633 | UE61C | UE61D | UE61E | UE61F |
| U0634 | UE620 | UE621 | UE622 | UE623 |
| U0635 | UE624 | UE625 | UE626 | UE627 |
| U0636 | UE628 | UE629 | UE62A | UE62B |
| U0637 | UE62C | UE62D | UE62E | UE62F |
| U0638 | UE630 | UE631 | UE632 | UE633 |
| U0639 | UE634 | UE635 | UE636 | UE637 |
| U063A | UE638 | UE639 | UE63A | UE63B |
| U0640 | UE63C | UE63D | UE63E | UE63F |
| U0641 | UE640 | UE641 | UE642 | UE643 |
| U0642 | UE644 | UE645 | UE646 | UE647 |
| U0643 | UE648 | UE649 | UE64A | UE64B |
| U0644 | UE64C | UE64D | UE64E | UE64F |
| U0645 | UE650 | UE651 | UE652 | UE653 |
| U0646 | UE654 | UE655 | UE656 | UE657 |
| U0647 | UE658 | UE659 | UE65A | UE65B |
| U0649 | UE65C | UE65D | UE65E | UE65F |
| U064A | UE660 | UE661 | UE662 | UE663 |
| U066E | UE664 | UE665 | UE666 | UE667 |
| U066F | UE668 | UE669 | UE66A | UE66B |
| U0678 | UE66C | UE66D | UE66E | UE66F |
| U0679 | UE670 | UE671 | UE672 | UE673 |
| U067A | UE674 | UE675 | UE676 | UE677 |
| U067B | UE678 | UE679 | UE67A | UE67B |
| U067C | UE67C | UE67D | UE67E | UE67F |
| U067D | UE680 | UE681 | UE682 | UE683 |
| U067E | UE684 | UE685 | UE686 | UE687 |
| U067F | UE688 | UE689 | UE68A | UE68B |
| U0680 | UE68C | UE68D | UE68E | UE68F |
| U0681 | UE690 | UE691 | UE692 | UE693 |
| U0682 | UE694 | UE695 | UE696 | UE697 |
| U0683 | UE698 | UE699 | UE69A | UE69B |
| U0684 | UE69C | UE69D | UE69E | UE69F |
| U0685 | UE6A0 | UE6A1 | UE6A2 | UE6A3 |
| U0686 | UE6A4 | UE6A5 | UE6A6 | UE6A7 |
| U0687 | UE6A8 | UE6A9 | UE6AA | UE6AB |
| U069A | UE6AC | UE6AD | UE6AE | UE6AF |
| U069B | UE6B0 | UE6B1 | UE6B2 | UE6B3 |
| U069C | UE6B4 | UE6B5 | UE6B6 | UE6B7 |
| U069D | UE6B8 | UE6B9 | UE6BA | UE6BB |
| U069E | UE6BC | UE6BD | UE6BE | UE6BF |
| U069F | UE6C0 | UE6C1 | UE6C2 | UE6C3 |
| U06A0 | UE6C4 | UE6C5 | UE6C6 | UE6C7 |
| U06A1 | UE6C8 | UE6C9 | UE6CA | UE6CB |
| U06A2 | UE6CC | UE6CD | UE6CE | UE6CF |
| U06A3 | UE6D0 | UE6D1 | UE6D2 | UE6D3 |
| U06A4 | UE6D4 | UE6D5 | UE6D6 | UE6D7 |
| U06A5 | UE6D8 | UE6D9 | UE6DA | UE6DB |
| U06A6 | UE6DC | UE6DD | UE6DE | UE6DF |
| U06A7 | UE6E0 | UE6E1 | UE6E2 | UE6E3 |
| U06A8 | UE6E4 | UE6E5 | UE6E6 | UE6E7 |
| U06A9 | UE6E8 | UE6E9 | UE6EA | UE6EB |
| U06AA | UE6EC | UE6ED | UE6EE | UE6EF |
| U06AB | UE6F0 | UE6F1 | UE6F2 | UE6F3 |
| U06AC | UE6F4 | UE6F5 | UE6F6 | UE6F7 |
| U06AD | UE6F8 | UE6F9 | UE6FA | UE6FB |
| U06AE | UE6FC | UE6FD | UE6FE | UE6FF |
| U06AF | UE700 | UE701 | UE702 | UE703 |
| U06B0 | UE704 | UE705 | UE706 | UE707 |
| U06B1 | UE708 | UE709 | UE70A | UE70B |
| U06B2 | UE70C | UE70D | UE70E | UE70F |
| U06B3 | UE710 | UE711 | UE712 | UE713 |
| U06B4 | UE714 | UE715 | UE716 | UE717 |
| U06B5 | UE718 | UE719 | UE71A | UE71B |
| U06B6 | UE71C | UE71D | UE71E | UE71F |
| U06B7 | UE720 | UE721 | UE722 | UE723 |
| U06B8 | UE724 | UE725 | UE726 | UE727 |
| U06B9 | UE728 | UE729 | UE72A | UE72B |
| U06BA | UE72C | UE72D | UE72E | UE72F |
| U06BB | UE730 | UE731 | UE732 | UE733 |
| U06BC | UE734 | UE735 | UE736 | UE737 |
| U06BD | UE738 | UE739 | UE73A | UE73B |
| U06BE | UE73C | UE73D | UE73E | UE73F |
| U06BF | UE740 | UE741 | UE742 | UE743 |
| U06C1 | UE744 | UE745 | UE746 | UE747 |
| U06CC | UE748 | UE749 | UE74A | UE74B |
| U06CE | UE74C | UE74D | UE74E | UE74F |
| U06D0 | UE750 | UE751 | UE752 | UE753 |
| U06D1 | UE754 | UE755 | UE756 | UE757 |
| U06FA | UE758 | UE759 | UE75A | UE75B |
| U06FB | UE75C | UE75D | UE75E | UE75F |
| U06FC | UE760 | UE761 | UE762 | UE763 |
| U06FF | UE764 | UE765 | UE766 | UE767 |
| U0750 | UE768 | UE769 | UE76A | UE76B |
| U0751 | UE76C | UE76D | UE76E | UE76F |
| U0752 | UE770 | UE771 | UE772 | UE773 |
| U0753 | UE774 | UE775 | UE776 | UE777 |
| U0754 | UE778 | UE779 | UE77A | UE77B |
| U0755 | UE77C | UE77D | UE77E | UE77F |
| U0756 | UE780 | UE781 | UE782 | UE783 |
| U0757 | UE784 | UE785 | UE786 | UE787 |
| U0758 | UE788 | UE789 | UE78A | UE78B |
| U075C | UE78C | UE78D | UE78E | UE78F |
| U075D | UE790 | UE791 | UE792 | UE793 |
| U075E | UE794 | UE795 | UE796 | UE797 |
| U075F | UE798 | UE799 | UE79A | UE79B |
| U0760 | UE79C | UE79D | UE79E | UE79F |
| U0761 | UE7A0 | UE7A1 | UE7A2 | UE7A3 |
| U0762 | UE7A4 | UE7A5 | UE7A6 | UE7A7 |
| U0763 | UE7A8 | UE7A9 | UE7AA | UE7AB |
| U0764 | UE7AC | UE7AD | UE7AE | UE7AF |
| U0765 | UE7B0 | UE7B1 | UE7B2 | UE7B3 |
| U0766 | UE7B4 | UE7B5 | UE7B6 | UE7B7 |
| U0767 | UE7B8 | UE7B9 | UE7BA | UE7BB |
| U0768 | UE7BC | UE7BD | UE7BE | UE7BF |
| U0769 | UE7C0 | UE7C1 | UE7C2 | UE7C3 |
| U076A | UE7C4 | UE7C5 | UE7C6 | UE7C7 |