00001 /* $Id: unicode.h 19812 2010-05-13 09:44:44Z rubidium $ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. 00006 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00007 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. 00008 */ 00009 00012 struct DefaultUnicodeMapping { 00013 WChar code; 00014 byte key; 00015 }; 00016 00017 static const byte CLRA = 0; 00018 static const byte CLRL = 1; 00019 00020 /* Default unicode mapping table for sprite based glyphs. 00021 * This table allows us use unicode characters even though the glyphs don't 00022 * exist, or are in the wrong place, in the standard sprite fonts. 00023 * This is not used for FreeType rendering */ 00024 00025 static const DefaultUnicodeMapping _default_unicode_map[] = { 00026 { 0x00A0, 0x20 }, // Non-breaking space / Up arrow 00027 { 0x00A4, CLRL }, // Currency sign 00028 { 0x00A6, CLRL }, // Broken bar 00029 { 0x00A7, CLRL }, // Section sign 00030 { 0x00A8, CLRL }, // Diaeresis 00031 { 0x00A9, CLRL }, // Copyright sign 00032 { 0x00AA, CLRA }, // Feminine ordinal indicator / Down arrow 00033 { 0x00AC, CLRA }, // Not sign / Tick mark 00034 { 0x00AD, 0x20 }, // Soft hyphen / X mark 00035 { 0x00AF, CLRA }, // Macron / Right arrow 00036 { 0x00B0, CLRL }, // Degree sign 00037 { 0x00B1, CLRL }, // Plus-Minus sign 00038 { 0x00B2, CLRL }, // Superscript 2 00039 { 0x00B3, CLRL }, // Superscript 3 00040 { 0x00B4, CLRA }, // Acute accent / Train symbol 00041 { 0x00B5, CLRA }, // Micro sign / Truck symbol 00042 { 0x00B6, CLRA }, // Pilcrow sign / Bus symbol 00043 { 0x00B7, CLRA }, // Middle dot / Aircraft symbol 00044 { 0x00B8, CLRA }, // Cedilla / Ship symbol 00045 { 0x00B9, CLRA }, // Superscript 1 / Superscript -1 00046 { 0x00BA, CLRL }, // Masculine ordinal indicator 00047 { 0x00BC, CLRA }, // One quarter / Small up arrow 00048 { 0x00BD, CLRA }, // One half / Small down arrow 00049 { 0x00BE, CLRL }, // Three quarters 00050 { 0x00D0, CLRL }, // Capital letter eth 00051 { 0x00D7, CLRL }, // Multiplication sign 00052 { 0x00D8, CLRL }, // Capital letter O with stroke 00053 { 0x00D9, CLRL }, // Capital letter U with grave 00054 { 0x00DE, CLRL }, // Capital letter thorn 00055 { 0x00E6, CLRL }, // Small letter ae 00056 { 0x00F0, CLRL }, // Small letter eth 00057 { 0x00F7, CLRL }, // Divison sign 00058 { 0x00F8, CLRL }, // Small letter o with stroke 00059 { 0x00FE, CLRL }, // Small letter thorn 00060 { 0x0178, 0x9F }, // Capital letter Y with diaeresis 00061 { 0x010D, 0x63 }, // Small letter c with caron 00062 };