5 Modification information for LGPL compliance
7 r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync
9 r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover
11 r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex
13 r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system
15 r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development
17 r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372
19 r46451 - 2009-04-23 16:57:40 -0700 (Thu, 23 Apr 2009) - jenny - tcpdf initial checkin.
25 //============================================================+
26 // File name : unicode_data.php
28 // Last Update : 2008-11-17
29 // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
30 // ----------------------------------------------------------------------------
31 // Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
33 // This program is free software: you can redistribute it and/or modify
34 // it under the terms of the GNU Lesser General Public License as published by
35 // the Free Software Foundation, either version 2.1 of the License, or
36 // (at your option) any later version.
38 // This program is distributed in the hope that it will be useful,
39 // but WITHOUT ANY WARRANTY; without even the implied warranty of
40 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 // GNU Lesser General Public License for more details.
43 // You should have received a copy of the GNU Lesser General Public License
44 // along with this program. If not, see <http://www.gnu.org/licenses/>.
46 // See LICENSE.TXT file for more information.
47 // ----------------------------------------------------------------------------
49 // Description : Unicode Include file for TCPDF.
51 // Author: Nicola Asuni
57 // 09044 Quartucciu (CA)
61 //============================================================+
63 // Efthimios Mavrogeorgiadis
67 * Unicode Include file for TCPDF.
68 * @author Nicola Asuni
69 * @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
70 * @package com.tecnick.tcpdf
71 * @link http://www.tcpdf.org
72 * @license http://www.gnu.org/copyleft/lesser.html LGPL
73 * @since 2.1.000 (2008-01-08)
79 define('K_LRM', 8206);
83 define('K_RLM', 8207);
85 * Left-to-Right Embedding
87 define('K_LRE', 8234);
89 * Right-to-Left Embedding
91 define('K_RLE', 8235);
93 * Pop Directional Format
95 define('K_PDF', 8236);
97 * Left-to-Right Override
99 define('K_LRO', 8237);
101 * Right-to-Left Override
103 define('K_RLO', 8238);
106 * Pattern to test RTL (Righ-To-Left) strings using regular expressions.
108 define('K_RE_PATTERN_RTL', "/(
110 | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R
111 | \xDF[\x80-\xAA\xB4\xB5\xBA] # R
113 | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE] # R
114 | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F] # R
115 | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R
116 | \xF0\x90\xA4[\x80-\x99] # R
117 | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R
118 | \xF0\x90\xA9[\x80-\x87\x90-\x98] # R
119 | \xE2\x80[\xAB\xAE] # RLE & RLO
123 * Pattern to test Arabic strings using regular expressions.
124 * source: http://www.w3.org/International/questions/qa-forms-utf-8
126 define("K_RE_PATTERN_ARABIC", "/(
127 \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL
128 | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL
129 | \xDA[\x80-\xBF] # AL
130 | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF] # AL
131 | \xDC[\x80-\x8D\x90\x92-\xAF] # AL
132 | \xDD[\x8D-\xAD] # AL
133 | \xDE[\x80-\xA5\xB1] # AL
134 | \xEF\xAD[\x90-\xBF] # AL
135 | \xEF\xAE[\x80-\xB1] # AL
136 | \xEF\xAF[\x93-\xBF] # AL
137 | \xEF[\xB0-\xB3][\x80-\xBF] # AL
138 | \xEF\xB4[\x80-\xBD] # AL
139 | \xEF\xB5[\x90-\xBF] # AL
140 | \xEF\xB6[\x80-\x8F\x92-\xBF] # AL
141 | \xEF\xB7[\x80-\x87\xB0-\xBC] # AL
142 | \xEF\xB9[\xB0-\xB4\xB6-\xBF] # AL
143 | \xEF\xBA[\x80-\xBF] # AL
144 | \xEF\xBB[\x80-\xBC] # AL
145 | \xD9[\xA0-\xA9\xAB\xAC] # AN
149 * Array of unicode types
17876 * Mirror unicode characters.
17877 * For information on bidi mirroring, see UAX #9: Bidirectional Algorithm,
17878 * at http://www.unicode.org/unicode/reports/tr9/
17880 global $unicode_mirror;
17881 $unicode_mirror = array (
18236 * Arabic shape subtitutions
18237 * char code=>isolated, final, initial, medial
18239 global $unicode_arlet;
18240 $unicode_arlet = array(
18241 1569=>array(65152),
18242 1570=>array(65153, 65154, 65153, 65154),
18243 1571=>array(65155, 65156, 65155, 65156),
18244 1572=>array(65157, 65158),
18245 1573=>array(65159, 65160, 65159, 65160),
18246 1574=>array(65161, 65162, 65163, 65164),
18247 1575=>array(65165, 65166, 65165, 65166),
18248 1576=>array(65167, 65168, 65169, 65170),
18249 1577=>array(65171, 65172),
18250 1578=>array(65173, 65174, 65175, 65176),
18251 1579=>array(65177, 65178, 65179, 65180),
18252 1580=>array(65181, 65182, 65183, 65184),
18253 1581=>array(65185, 65186, 65187, 65188),
18254 1582=>array(65189, 65190, 65191, 65192),
18255 1583=>array(65193, 65194, 65193, 65194),
18256 1584=>array(65195, 65196, 65195, 65196),
18257 1585=>array(65197, 65198, 65197, 65198),
18258 1586=>array(65199, 65200, 65199, 65200),
18259 1587=>array(65201, 65202, 65203, 65204),
18260 1588=>array(65205, 65206, 65207, 65208),
18261 1589=>array(65209, 65210, 65211, 65212),
18262 1590=>array(65213, 65214, 65215, 65216),
18263 1591=>array(65217, 65218, 65219, 65220),
18264 1592=>array(65221, 65222, 65223, 65224),
18265 1593=>array(65225, 65226, 65227, 65228),
18266 1594=>array(65229, 65230, 65231, 65232),
18267 1601=>array(65233, 65234, 65235, 65236),
18268 1602=>array(65237, 65238, 65239, 65240),
18269 1603=>array(65241, 65242, 65243, 65244),
18270 1604=>array(65245, 65246, 65247, 65248),
18271 1605=>array(65249, 65250, 65251, 65252),
18272 1606=>array(65253, 65254, 65255, 65256),
18273 1607=>array(65257, 65258, 65259, 65260),
18274 1608=>array(65261, 65262, 65261, 65262),
18275 1609=>array(65263, 65264, 64488, 64489),
18276 1610=>array(65265, 65266, 65267, 65268),
18277 1649=>array(64336, 64337),
18278 1655=>array(64477),
18279 1657=>array(64358, 64359, 64360, 64361),
18280 1658=>array(64350, 64351, 64352, 64353),
18281 1659=>array(64338, 64339, 64340, 64341),
18282 1662=>array(64342, 64343, 64344, 64345),
18283 1663=>array(64354, 64355, 64356, 64357),
18284 1664=>array(64346, 64347, 64348, 64349),
18285 1667=>array(64374, 64375, 64376, 64377),
18286 1668=>array(64370, 64371, 64372, 64373),
18287 1670=>array(64378, 64379, 64380, 64381),
18288 1671=>array(64382, 64383, 64384, 64385),
18289 1672=>array(64392, 64393),
18290 1676=>array(64388, 64389),
18291 1677=>array(64386, 64387),
18292 1678=>array(64390, 64391),
18293 1681=>array(64396, 64397),
18294 1688=>array(64394, 64395, 64394, 64395),
18295 1700=>array(64362, 64363, 64364, 64365),
18296 1702=>array(64366, 64367, 64368, 64369),
18297 1705=>array(64398, 64399, 64400, 64401),
18298 1709=>array(64467, 64468, 64469, 64470),
18299 1711=>array(64402, 64403, 64404, 64405),
18300 1713=>array(64410, 64411, 64412, 64413),
18301 1715=>array(64406, 64407, 64408, 64409),
18302 1722=>array(64414, 64415),
18303 1723=>array(64416, 64417, 64418, 64419),
18304 1726=>array(64426, 64427, 64428, 64429),
18305 1728=>array(64420, 64421),
18306 1729=>array(64422, 64423, 64424, 64425),
18307 1733=>array(64480, 64481),
18308 1734=>array(64473, 64474),
18309 1735=>array(64471, 64472),
18310 1736=>array(64475, 64476),
18311 1737=>array(64482, 64483),
18312 1739=>array(64478, 64479),
18313 1740=>array(64508, 64509, 64510, 64511),
18314 1744=>array(64484, 64485, 64486, 64487),
18315 1746=>array(64430, 64431),
18316 1747=>array(64432, 64433)
18320 * Arabic laa letter
18321 * char code=>isolated, final, initial, medial
18324 $laa_array = array (
18325 1570 =>array(65269, 65270, 65269, 65270),
18326 1571 =>array(65271, 65272, 65271, 65272),
18327 1573 =>array(65273, 65274, 65273, 65274),
18328 1575 =>array(65275, 65276, 65275, 65276)
18332 * Array of character substitutions for sequences of two diacritics symbols starting with SHADDA (0651 HEX, 1617 DEC).
18333 * Combining characters that can occur with Shadda (U0651) are placed in UE586-UE594.
18334 * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
18335 * second NSM char code=>substitution char
18337 global $diacritics;
18338 $diacritics = array (
18339 1612=>64606, # Shadda + Dammatan
18340 1613=>64607, # Shadda + Kasratan
18341 1614=>64608, # Shadda + Fatha
18342 1615=>64609, # Shadda + Damma
18343 1616=>64610 # Shadda + Kasra
18347 * Array of character substitutions from UTF-8 unicode to latin1
18349 global $utf8tolatin;
18350 $utf8tolatin = array (
18354 376=>159, # Ydieresis
18355 381=>142, # Zcaron2
18356 8226=>149, # bullet3
18357 710=>136, # circumflex
18358 8224=>134, # dagger
18359 8225=>135, # daggerdbl
18360 8230=>133, # ellipsis
18361 8212=>151, # emdash
18362 8211=>150, # endash
18364 8249=>139, # guilsinglleft
18365 8250=>155, # guilsinglright
18367 8240=>137, # perthousand
18368 8222=>132, # quotedblbase
18369 8220=>147, # quotedblleft
18370 8221=>148, # quotedblright
18371 8216=>145, # quoteleft
18372 8217=>146, # quoteright
18373 8218=>130, # quotesinglbase
18376 8482=>153, # trademark
18380 //============================================================+
18382 //============================================================+