author | rubidium |
Sun, 25 May 2008 19:17:03 +0000 | |
changeset 9354 | 845e07db4549 |
parent 9111 | 48ce04029fe4 |
permissions | -rw-r--r-- |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
1 |
/* $Id$ */ |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
2 |
|
9111
48ce04029fe4
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8411
diff
changeset
|
3 |
/** @file unicode.h Character mapping for using Unicode characters in OTTD. */ |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
4 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
5 |
struct DefaultUnicodeMapping { |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
6 |
WChar code; ///< Unicode value |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
7 |
byte key; ///< Character index of sprite |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
5475
diff
changeset
|
8 |
}; |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
9 |
|
8411
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
10 |
enum { |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
11 |
CLRA = 0, ///< Identifier to clear all glyphs at this codepoint |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
12 |
CLRL = 1, ///< Identifier to clear glyphs for large font at this codepoint |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
13 |
}; |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
14 |
|
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
15 |
/* Default unicode mapping table for sprite based glyphs. |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
16 |
* This table allows us use unicode characters even though the glyphs don't |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
17 |
* exist, or are in the wrong place, in the standard sprite fonts. |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
18 |
* This is not used for FreeType rendering */ |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
19 |
|
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
20 |
static DefaultUnicodeMapping _default_unicode_map[] = { |
8411
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
21 |
{ 0x00A0, 0x20 }, /* Non-breaking space / Up arrow */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
22 |
{ 0x00A4, CLRL }, /* Currency sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
23 |
{ 0x00A6, CLRL }, /* Broken bar */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
24 |
{ 0x00A7, CLRL }, /* Section sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
25 |
{ 0x00A8, CLRL }, /* Diaeresis */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
26 |
{ 0x00A9, CLRL }, /* Copyright sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
27 |
{ 0x00AA, CLRA }, /* Feminine ordinal indicator / Down arrow */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
28 |
{ 0x00AC, CLRA }, /* Not sign / Tick mark */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
29 |
{ 0x00AD, 0x20 }, /* Soft hyphen / X mark */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
30 |
{ 0x00AF, CLRA }, /* Macron / Right arrow */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
31 |
{ 0x00B0, CLRL }, /* Degree sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
32 |
{ 0x00B1, CLRL }, /* Plus-Minus sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
33 |
{ 0x00B2, CLRL }, /* Superscript 2 */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
34 |
{ 0x00B3, CLRL }, /* Superscript 3 */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
35 |
{ 0x00B4, CLRA }, /* Acute accent / Train symbol */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
36 |
{ 0x00B5, CLRA }, /* Micro sign / Truck symbol */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
37 |
{ 0x00B6, CLRA }, /* Pilcrow sign / Bus symbol */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
38 |
{ 0x00B7, CLRA }, /* Middle dot / Aircraft symbol */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
39 |
{ 0x00B8, CLRA }, /* Cedilla / Ship symbol */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
40 |
{ 0x00B9, CLRA }, /* Superscript 1 / Superscript -1 */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
41 |
{ 0x00BA, CLRL }, /* Masculine ordinal indicator */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
42 |
{ 0x00BC, CLRA }, /* One quarter / Small up arrow */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
43 |
{ 0x00BD, CLRA }, /* One half / Small down arrow */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
44 |
{ 0x00BE, CLRL }, /* Three quarters */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
45 |
{ 0x00D0, CLRL }, /* Capital letter eth */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
46 |
{ 0x00D7, CLRL }, /* Multiplication sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
47 |
{ 0x00D8, CLRL }, /* Capital letter O with stroke */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
48 |
{ 0x00D9, CLRL }, /* Capital letter U with grave */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
49 |
{ 0x00DE, CLRL }, /* Capital letter thorn */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
50 |
{ 0x00E6, CLRL }, /* Small letter ae */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
51 |
{ 0x00F0, CLRL }, /* Small letter eth */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
52 |
{ 0x00F7, CLRL }, /* Divison sign */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
53 |
{ 0x00F8, CLRL }, /* Small letter o with stroke */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
54 |
{ 0x00FE, CLRL }, /* Small letter thorn */ |
591f0c085e10
(svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
peter1138
parents:
8375
diff
changeset
|
55 |
{ 0x0178, 0x9F }, /* Capital letter Y with diaeresis */ |
5108
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
56 |
{ 0x010D, 0x63 }, /* Small letter c with caron */ |
aeaef6fe53b7
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
diff
changeset
|
57 |
}; |