pango r2695 - in trunk: . docs pango



Author: behdad
Date: Wed Aug 20 03:07:50 2008
New Revision: 2695
URL: http://svn.gnome.org/viewvc/pango?rev=2695&view=rev

Log:
2008-08-19  Behdad Esfahbod  <behdad gnome org>

        Bug 473806 â Improve pango_language_get_sample_string()

        * docs/Makefile.am:
        * pango/Makefile.am:
        * pango/pango-language-sample-table.h:
        * pango/pango-language.c (pango_language_get_sample_string):
        Add language sample texts that are actually usable.  Compiled from
        a variety of sources.  See pango-language-sample-table.h.

Added:
   trunk/pango/pango-language-sample-table.h
Modified:
   trunk/ChangeLog
   trunk/docs/Makefile.am
   trunk/pango/Makefile.am
   trunk/pango/pango-language.c

Modified: trunk/docs/Makefile.am
==============================================================================
--- trunk/docs/Makefile.am	(original)
+++ trunk/docs/Makefile.am	Wed Aug 20 03:07:50 2008
@@ -41,7 +41,8 @@
 	pangox-private.h	\
 	pangoxft-private.h	\
 	pango-ot-private.h	\
-	pango-script-lang-table.h
+	pango-script-lang-table.h	\
+	pango-language-sample-table.h
 
 # CFLAGS and LDFLAGS for compiling scan program. Only needed
 # if $(DOC_MODULE).types is non-empty.

Modified: trunk/pango/Makefile.am
==============================================================================
--- trunk/pango/Makefile.am	(original)
+++ trunk/pango/Makefile.am	Wed Aug 20 03:07:50 2008
@@ -80,6 +80,7 @@
 	pango-impl-utils.h			\
 	pango-item.c				\
 	pango-language.c			\
+	pango-language-sample-table.h		\
 	pango-layout.c				\
 	pango-layout-private.h			\
 	pango-markup.c				\

Added: trunk/pango/pango-language-sample-table.h
==============================================================================
--- (empty file)
+++ trunk/pango/pango-language-sample-table.h	Wed Aug 20 03:07:50 2008
@@ -0,0 +1,599 @@
+/* Pango Language Sample Table
+ *
+ * Each entry is of the form:
+ *
+ * LANGUAGE(
+ * 	 code	|* Name *|,
+ * 	 SOURCE,
+ * 	 "Sample text for the language."
+ * 	 |* Translation of the sample text to English *|
+ * 	)
+ *
+ * Where code is the ISO639-1, ISO639-2, or ISO639-3 code for the language,
+ * the first one that exists.  Name is the name of the language in English.
+ *
+ * Source is where the sample text comes from.  One of:
+ *
+ * WP-PANG
+ * 	Wikipedia's List of Pangrams in Other Languages
+ * 	http://en.wikipedia.org/wiki/List_of_pangrams#Other_languages
+ * 	Fetched on 2008-08-19
+ *
+ * WP-SFD
+ * 	Wikipedia's Sample Font Displays in Other Languages
+ * 	http://en.wikipedia.org/wiki/Sample_Font_Displays_In_Other_Languages
+ * 	Fetched on 2008-08-19
+ *
+ * GLASS
+ * 	Kermit project's "I Can Eat Glass" list, also available in pango-view/
+ * 	http://www.columbia.edu/kermit/utf8.html#glass
+ * 	Fetched on 2008-08-19
+ *
+ * KERMIT
+ * 	Kermit project's Quick-Brown-Fox equivalents for other languages
+ * 	http://www.columbia.edu/kermit/utf8.html#quickbrownfox
+ * 	Fetched on 2008-08-19
+ *
+ * GSPECI
+ * 	gnome-specimen's translations
+ * 	http://svn.gnome.org/viewvc/gnome-specimen/trunk/po/
+ * 	Fetched on 2008-08-19
+ *
+ * MISC
+ * 	Miscellaneous
+ *
+ * The sample text may be a pangram, but is not necessarily.  It is chosen to
+ * be demonstrative of normal text in the language, as well as exposing font
+ * feature requirements unique to the language.  It should be suitable for use
+ * as sample text in a font selection dialog.
+ */
+LANGUAGE(
+	 af	/* Afrikaans */,
+	 GLASS,
+	 "Ek kan glas eet, maar dit doen my nie skade nie."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ar	/* Arabic */,
+	 WP-PANG,
+	 "ÙØ ØÙÙÙ ÙÙ ØØ ÙØØØ ÙØÙ ØØÙ ØØÙÙ ÙÙØÙØ ØÙÙ ØÙØ ØØØØ ÙÙØÙÙ ØØÙØ ØØØÙ"
+	 /* A wise text which has an absolute secret and great importance, written on a green tissue and covered with blue leather */
+	)
+LANGUAGE(
+	 arn	/* Mapudungun */,
+	 WP-PANG,
+	 "Gvxam mincetu apocikvyeh: Ãizol ce mamvj ka raq kuse bafkeh mew"
+	 /* Tale under the full moon: the chief chemamull and the clay old woman at the lake/sea. */
+	)
+LANGUAGE(
+	 bar	/* Bavarian */,
+	 GLASS,
+	 "I koh Glos esa, und es duard ma ned wei."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 bg	/* Bulgarian */,
+	 WP-SFD,
+	 "ÐÐÐ ÑÐÐÐ ÐÑÑÐÐ, ÑÑÑÑÑÑÐ Ð ÑÐÐÑÐ, ÐÑÐÐÑÐ ÐÐÐÐÐ ÐÑÑÐÐÐÐ ÐÐÐÑÐ."
+	 /* A little fluffy young rabbit ran under a southern tree blooming in blue */
+	)
+LANGUAGE(
+	 bi	/* Bislama */,
+	 GLASS,
+	 "Mi save kakae glas, hemi no save katem mi."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 bn	/* Bengali */,
+	 GLASS,
+	 "ààà àààà àààà àààà, àààà àààà àààà ààààà àà ààà"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 bo	/* Tibetan */,
+	 GLASS,
+	 "àààààààààààààààààààààààààà"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 bs	/* Bosnian */,
+	 WP-PANG,
+	 "Fin dÅip, gluh jeÅ i Ävrst konjiÄ doÄoÅe bez moljca."
+	 /* A nice jeep, a deaf hedgehog and a tough horse came without a moth. */
+	)
+LANGUAGE(
+	 ca	/* Catalan */,
+	 WP-PANG,
+	 "Jove xef, porti whisky amb quinze glaÃons d'hidrogen, coi!"
+	 /* Young chef, bring whisky with fifteen hydrogen ice cubes, damn! */
+	)
+LANGUAGE(
+	 ch	/* Chamorro */,
+	 GLASS,
+	 "SiÃa yo' chumocho krestat, ti ha na'lalamen yo'."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 cs	/* Czech */,
+	 WP-SFD,
+	 "PÅÃliÅ ÅluÅouÄkà kÅÅ ÃpÄl ÄÃbelskà Ãdy."
+	 /* A too yellow horse moaned devil odes. */
+	)
+LANGUAGE(
+	 cy	/* Welsh */,
+	 GLASS,
+	 "Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 da	/* Danish */,
+	 WP-SFD,
+	 "Quizdeltagerne spiste jordbÃr med flÃde, mens cirkusklovnen Walther spillede pà xylofon."
+	 /* The quiz contestants ate strawberries with cream while Walther the clown was playing the xylophone. */
+	)
+LANGUAGE(
+	 de	/* German */,
+	 WP-SFD,
+	 "ZwÃlf BoxkÃmpfer jagen Viktor quer Ãber den groÃen Sylter Deich"
+	 /* Twelve boxing fighters drive Viktor over the great */
+	)
+LANGUAGE(
+	 el	/* Greek */,
+	 WP-SFD,
+	 "ÎÎÎÎÎ ÎÏÎÏÎ ÎÎÎ ÏÏÎÎÎ Î ÎÎÎÏÎÎÏÎÎ. (ÎÎÎÏÎÎÏ ÎÎÎÎÎÏ)"
+	 /* Liberty requires virtue and mettle. (Andreas Kalvos) */
+	)
+LANGUAGE(
+	 en	/* English */,
+	 GSPECI,
+	 "The quick brown fox jumps over the lazy dog."
+	)
+LANGUAGE(
+	 enm	/* Middle English */,
+	 GLASS,
+	 "Ich canne glas eten and hit hirtià me nouÈt."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 eo	/* Esperanto */,
+	 WP-SFD,
+	 "EÄoÅanÄo ÄiuÄaÅde."
+	 /* Change of echo every Thursday. */
+	)
+LANGUAGE(
+	 es	/* Spanish */,
+	 WP-PANG,
+	 "Jovencillo emponzoÃado de whisky: Âquà figurota exhibe!"
+	 /* Whisky-intoxicated youngster â what a figure he's showing! */
+	)
+LANGUAGE(
+	 et	/* Estonian */,
+	 WP-SFD,
+	 "See vÃike mÃlder jÃuab rongile hÃpata"
+	 /* This small miller is able to jump on the train */
+	)
+LANGUAGE(
+	 eu	/* Basque */,
+	 GLASS,
+	 "Kristala jan dezaket, ez dit minik ematen."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 fa	/* Persian */,
+	 MISC	/* Behdad Esfahbod */,
+	 "ÂØÙÙØ ÛØ ØÙÛÙÙÙØ ØÙØÙØÙÛ ØÙØÙØ ÚÙØÙØØÙ ÙÙ ÙØÙÙÙÙÙÙØÂ ÚÙ ØØÙ ØØØÙ ÙÙÙØ ØÙÙ ÙÙÛ ØÙØØØ ÙØÚÙâÙØ"
+	)
+LANGUAGE(
+	 fi	/* Finnish */,
+	 WP-SFD,
+	 "Viekas kettu punaturkki laiskan koiran takaa kurkki."
+	 /* The cunning red-coated fox peeped from behind the lazy dog. */
+	)
+LANGUAGE(
+	 fr	/* French */,
+	 WP-PANG,
+	 "Voyez le brick gÃant que j'examine prÃs du wharf."
+	 /* See the giant brig I'm examining near the wharf. */
+	)
+LANGUAGE(
+	 fro	/* Old French */,
+	 GLASS,
+	 "Je puis mangier del voirre. Ne me nuit."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ga	/* Irish */,
+	 WP-PANG,
+	 "D'áuascail Ãosa Ãráac na hÃiÄe Beannaiáe pÃr Ãaáa agus Ãáaiá."
+	 /* Jesus, Son of the blessed Virgin, redeemed the seed of Eve and Adam. */
+	)
+LANGUAGE(
+	 gd	/* Scottish Gaelic */,
+	 GLASS,
+	 "S urrainn dhomh gloinne ithe; cha ghoirtich i mi."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 gl	/* Galician */,
+	 GLASS,
+	 "Eu podo xantar cristais e non cortarme."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 got	/* Gothic */,
+	 GLASS,
+	 "ððð ðððð ðÌððð, ðð ððð ðð ðððð ððððððð."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 gv	/* Manx Gaelic */,
+	 GLASS,
+	 "Foddym gee glonney agh cha jean eh gortaghey mee."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 haw	/* Hawaiian */,
+	 GLASS,
+	 "Hiki iaÊu ke Êai i ke aniani; ÊaÊole nÅ lÄ au e Êeha."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 he	/* Hebrew */,
+	 WP-SFD,
+	 "×× ×××× ×× ×× ××× ×× ×× ×××× ××× ××××× ××××× ×××× ××."
+	 /* A curious fish sailed a clear sea, and suddenly found nice company that just popped up. */
+	)
+LANGUAGE(
+	 hi	/* Hindi */,
+	 GLASS,
+	 "ààà àààà àà àààà ààà, àààà àà àà ààà àààà àààà àààà."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 hr	/* Croatian */,
+	 GLASS,
+	 "Ja mogu jesti staklo i ne boli me."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 hu	/* Hungarian */,
+	 WP-SFD,
+	 "Egy hÅtlen vejÃt fÃlÃncsÃpÅ, dÃhÃs mexikÃi Ãr WesselÃnyinÃl mÃzol QuitÃban."
+	 /* An angry Mexican man, who caught his faithless son-in-law, is painting WesselÃnyi's house in Quito. */
+	)
+LANGUAGE(
+	 hy	/* Armenian */,
+	 GLASS,
+	 "ÔÖÕÕÕ ÕÕÕÕÕ ÕÖÕÕÕ Ö ÕÕÕÕ ÕÕÕÕÕÕÕÕÕ ÕÕÕÕÖÖ"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 is	/* Icelandic */,
+	 WP-PANG,
+	 "KÃmi nà Ãxi hÃr ykist ÃjÃfum nà bÃÃi vÃl og Ãdrepa"
+	 /* If a new axe were here, thieves would feel increasing deterrence and punishment. */
+	)
+LANGUAGE(
+	 it	/* Italian */,
+	 WP-SFD,
+	 "Ma la volpe, col suo balzo, ha raggiunto il quieto Fido."
+	 /* But the fox, with its jump, reached the calm dog */
+	)
+LANGUAGE(
+	 ja	/* Japanese */,
+	 KERMIT,
+	 "ããããããããããããããèãåãã æãããã"
+	)
+LANGUAGE(
+	 jam	/* Jamaican Creole English */,
+	 KERMIT,
+	 "Chruu, a kwik di kwik brong fox a jomp huova di liezi daag de, yu no siit?"
+	)
+LANGUAGE(
+	 jbo	/* Lojban */,
+	 WP-PANG,
+	 ".o'i mu xagji sofybakni cu zvati le purdi"
+	 /* Watch out, five hungry Soviet-cows are in the garden! */
+	)
+LANGUAGE(
+	 jv	/* Javanese */,
+	 GLASS,
+	 "Aku isa mangan beling tanpa lara."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ka	/* Georgian */,
+	 GLASS,
+	 "ááááá áááá áá ááá áááááá."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ko	/* Korean */,
+	 WP-SFD,
+	 "ëëì í ìëíì íêí"
+	 /* I Wanna ride on the chipmunk's old hamster wheel. */
+	)
+LANGUAGE(
+	 kw	/* Cornish */,
+	 GLASS,
+	 "MÃ a yl dybry gwÃder hag Ãf ny wra ow ankenya."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 la	/* Latin */,
+	 WP-PANG,
+	 "Sic surgens, dux, zelotypos quam karus haberis"
+	)
+LANGUAGE(
+	 lt	/* Lithuanian */,
+	 WP-PANG,
+	 "Älinkdama fechtuotojo Åpaga sublykÄiojusi pragrÄÅÄ apvalÅ arbÅzÄ"
+	 /* Incurving fencer sword sparkled and perforated a round watermelon */
+	)
+LANGUAGE(
+	 lv	/* Latvian */,
+	 WP-SFD,
+	 "SarkanÄs jÅrascÅciÅas peld pa jÅru."
+	 /* Red seapigs swim in the sea. */
+	)
+LANGUAGE(
+	 map	/* Marquesan */,
+	 GLASS,
+	 "E koÊana e kai i te karahi, mea ÊÄ, ÊaÊe hauhau."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 mk	/* Macedonian */,
+	 GLASS,
+	 "ÐÐÐÐÐ ÐÐ ÑÐÐÐÐ ÑÑÐÐÐÐ, Ð ÐÐ ÐÐ ÑÑÐÑÐ."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 mn	/* Mongolian */,
+	 GLASS,
+	 "áá áááá ááááá áááááá á ááááá áááááááá áááá"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 mr	/* Marathi */,
+	 GLASS,
+	 "àà ààà ààà àààà, ààà àà àààà àààà."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ms	/* Malay */,
+	 GLASS,
+	 "Saya boleh makan kaca dan ia tidak mencederakan saya."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 nap	/* Neapolitan */,
+	 GLASS,
+	 "M' pozz magna' o'vetr, e nun m' fa mal."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 nb	/* Norwegian BokmÃl */,
+	 GSPECI,
+	 "VÃr sÃre Zulu fra badeÃya spilte jo whist og quickstep i min taxi."
+	)
+LANGUAGE(
+	 nl	/* Dutch */,
+	 WP-SFD,
+	 "Pa's wijze lynx bezag vroom het fikse aquaduct."
+	 /* Dad's wise lynx piously regarded the substantial aqueduct. */
+	)
+LANGUAGE(
+	 nn	/* Norwegian Nynorsk */,
+	 GLASS,
+	 "Eg kan eta glas utan à skada meg."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 no	/* Norwegian BokmÃl */,
+	 GSPECI,
+	 "VÃr sÃre Zulu fra badeÃya spilte jo whist og quickstep i min taxi."
+	)
+LANGUAGE(
+	 nv	/* Navajo */,
+	 GLASS,
+	 "TsÃsÇÊ yishÄÌÄgo bÃÃnÃshghah dÃÃ doo shiÅ neezgai da."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 oc	/* Occitan */,
+	 GLASS,
+	 "PÃdi manjar de veire, me nafrarià pas."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 pcd	/* Picard */,
+	 GLASS,
+	 "Ch'peux mingi du verre, cha m'foà mie n'ma."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 pl	/* Polish */,
+	 WP-SFD,
+	 "PchnÄÄ w tÄ ÅÃdÅ jeÅa lub oÅm skrzyÅ fig."
+	 /* Push into this boat a hedgehog or eight boxes of figs. */
+	)
+LANGUAGE(
+	 pt	/* Portuguese */,
+	 WP-SFD,
+	 "Vejam a bruxa da raposa Salta-Pocinhas e o cÃo feliz que dorme regalado."
+	 /* Watch the witch of the Jump-Puddles fox and the happy dog that sleeps delighted. */
+	)
+LANGUAGE(
+	 pt-br	/* Brazilian Portuguese */,
+	 GSPECI,
+	 "Gazeta publica hoje no jornal uma breve nota de faxina na quermesse."
+	)
+LANGUAGE(
+	 ro	/* Romanian */,
+	 WP-SFD,
+	 "Agera vulpe maronie sare peste cÃinele cel leneÅ."
+	 /* The quick brown fox jumps over the lazy dog. */
+	)
+LANGUAGE(
+	 ru	/* Russian */,
+	 WP-PANG,
+	 "Ð ÑÐÑÐÑ ÑÐÐ ÐÐÐ ÐÑ ÑÐÑÑÑÑ? ÐÐ, ÐÐ ÑÐÐÑÑÐÐÑÐ ÑÐÐÐÐÐÐÑÑ!"
+	 /* Would a citrus live in the bushes of the south? Yes, but only a fake one! */
+	)
+LANGUAGE(
+	 sa	/* Sanskrit */,
+	 GLASS,
+	 "àààà àààààààààààààà à àààààààààà àààà à"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 scn	/* Sicilian */,
+	 GLASS,
+	 "Puotsu mangiari u vitru, nun mi fa mali."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 sk	/* Slovak */,
+	 KERMIT,
+	 "Starà kÃÅ na hÅbe knÃh Åuje tÃÅko povÃdnutà ruÅe, na stÄpe sa ÄateÄ uÄà kvÃkaÅ novà Ãdu o Åivote."
+	)
+LANGUAGE(
+	 sl	/* Slovenian */,
+	 WP-PANG,
+	 "Åerif bo za vajo spet kuhal domaÄe Ågance"
+	 /* For an exercise, sheriff will again make home-made mush */
+	)
+LANGUAGE(
+	 sq	/* Albanian */,
+	 GLASS,
+	 "Unà mund tà ha qelq dhe nuk mà gjen gjÃ."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 sr	/* Serbian (Cyrillic) */,
+	 WP-SFD,
+	 "ÐÐÑÑÐ ÑeÑÐÑÐ ÐÑeÐÐÑÑÐÐ ÑÐÐÐÐ ÐÐÐÐÑÑÐÐÐ ÑÐÑÑÐÐÐÐÐÑÐÑÑ ÐÐÐÑÐÐÑ ÑÐÐÑÐÐÐ."
+	 /* More frequent filtering through the reticular bag improves fertilization of genetic hybrids. */
+	)
+#if 0
+LANGUAGE(
+	 sr-sr latin	/* Serbian (Latin) */,
+	 WP-SFD,
+	 "ÄeÅÄe ceÄenje mreÅastim dÅakom poboljÅava fertilizaciju genskih hibrida."
+	 /* More frequent filtering through the reticular bag improves fertilization of genetic hybrids. */
+	)
+#endif
+LANGUAGE(
+	 sv	/* Swedish */,
+	 WP-SFD,
+	 "Flygande bÃckasiner sÃka strax hwila pà mjuka tuvor"
+	 /* Flying snipes soon look to rest on soft grass beds */
+	)
+LANGUAGE(
+	 swg	/* Swabian */,
+	 GLASS,
+	 "I kà Glas frÃssa, ond des macht mr nix!"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 ta	/* Tamil */,
+	 GLASS,
+	 "àààà ààààààà àààààààààààà, àààààà àààààà ààà àààààà ààààà."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 th	/* Thai */,
+	 WP-SFD,
+	 "ààààààààààààààààààààààààààààààà - ààààààààààààààààààààààààà - àààààààààààààààààààà àààààààààààààààààààààààààààà - ààààààààààààààààààààààààààààà - ààààààààààààààààààààààààà - ààààààààààààààààààààààà - ààààààààààà à ààà à àààààààààà"
+	 /* Being a man is worthy - Beyond senseless animal - Begin educate thyself - Begone from killing and trouble - Bear not thy grudge, damn and, curse - Bestow forgiving and sporting - Befit with rules - Benign speech speak thou */
+	)
+LANGUAGE(
+	 tl	/* Tagalog */,
+	 GLASS,
+	 "Kaya kong kumain nang bubog at hindi ako masaktan."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 tr	/* Turkish */,
+	 WP-PANG,
+	 "PijamalÄ hasta yaÄÄz ÅofÃre Ãabucak gÃvendi."
+	 /* The patient in pajamas trusted the swarthy driver quickly. */
+	)
+LANGUAGE(
+	 tw	/* Twi */,
+	 GLASS,
+	 "Metumi awe tumpan, ÉnyÉ me hwee."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 uk	/* Ukrainian */,
+	 WP-PANG,
+	 "ÐÑÑÑ ÑÑ, ÐÐÑÑ, ÐÐ? ÐÑÐÐÐÐÐ Ð ÑÐ, ÐÑÐÑÐÐÑÑ ÐÐÐ ÒÐÐÑÑÑÐ!"
+	 /* Daughter, do you hear them, eh? Oh, you are funny! Say good-bye without knee-length socks. */
+	)
+LANGUAGE(
+	 ur	/* Urdu */,
+	 GLASS,
+	 "ÙÛÚ ÚØÙÚ ÚÚØ ØÚØØ ÛÙÚ ØÙØ ÙØÚÛ ØÚÙÛÙ ÙÛÛÚ ÛÙØÛ Û"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 vec	/* Venetian */,
+	 GLASS,
+	 "Mi posso magnare el vetro, no'l me fa mae."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 vi	/* Vietnamese */,
+	 GSPECI,
+	 "Con sÃi nÃu nháy qua con chà lÆái."
+	)
+LANGUAGE(
+	 wa	/* Walloon */,
+	 GLASS,
+	 "Dji pou magnà do vÃre, Ãoula m' freut nÃn mÃ."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 yi	/* Yiddish */,
+	 GLASS,
+	 "××× ××× ××× ×××Ö× ××× ×× ××× ××× ×××× ××."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 yo	/* Yoruba */,
+	 GLASS,
+	 "Mo là jeÌ dÃgÃ, kà nà pa mà lÃra."
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 zh-cn	/* Chinese Simplified */,
+	 GLASS,
+	 "æèåäççèääèäã"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 zh-mo	/* Chinese Traditional */,
+	 GLASS,
+	 "æèåäççèäåèéã"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 zh-sg	/* Chinese Simplified */,
+	 GLASS,
+	 "æèåäççèääèäã"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 zh-tw	/* Chinese Traditional */,
+	 GLASS,
+	 "æèåäççèäåèéã"
+	 /* I can eat glass and it doesn't hurt me. */
+	)
+LANGUAGE(
+	 zlm	/* Malay */,
+	 GLASS,
+	 "Saya boleh makan kaca dan ia tidak mencederakan saya."
+	 /* I can eat glass and it doesn't hurt me. */
+	)

Modified: trunk/pango/pango-language.c
==============================================================================
--- trunk/pango/pango-language.c	(original)
+++ trunk/pango/pango-language.c	Wed Aug 20 03:07:50 2008
@@ -319,8 +319,8 @@
 }
 
 typedef struct {
-  const char lang[4];
-  const char *str;
+  char lang[6];
+  guint16 offset;
 } LangInfo;
 
 static int
@@ -349,36 +349,27 @@
   return lang_compare_first_component (key, lang_info->lang);
 }
 
-/* The following array is supposed to contain enough text to tickle all necessary fonts for each
- * of the languages in the following. Yes, it's pretty lame. Not all of the languages
- * in the following have sufficient text to exercise all the accents for the language, and
- * there are obviously many more languages to include as well.
- */
+/* Pure black magic, based on appendix of dsohowto.pdf */
+#define POOLSTRFIELD(line) POOLSTRFIELD1(line)
+#define POOLSTRFIELD1(line) str##line
+static const union _LangPool {
+  struct {
+    char str0[1];
+#define LANGUAGE(id, source, sample) char POOLSTRFIELD(__LINE__)[sizeof(sample)];
+#include "pango-language-sample-table.h"
+#undef LANGUAGE
+  };
+  const char str[1];
+} lang_pool = { {
+    "",
+#define LANGUAGE(id, source, sample) sample,
+#include "pango-language-sample-table.h"
+#undef LANGUAGE
+} };
 static const LangInfo lang_texts[] = {
-  { "ar", "Arabic  \330\247\331\204\330\263\331\204\330\247\331\205 \330\271\331\204\331\212\331\203\331\205" },
-  { "cs", "Czech (\304\215esky)  Dobr\303\275 den" },
-  { "da", "Danish (Dansk)  Hej, Goddag" },
-  { "el", "Greek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202" },
-  { "en", "English Hello" },
-  { "eo", "Esperanto Saluton" },
-  { "es", "Spanish (Espa\303\261ol) \302\241Hola!" },
-  { "et", "Estonian  Tere, Tervist" },
-  { "fi", "Finnish (Suomi)  Hei, Hyv\303\244\303\244 p\303\244iv\303\244\303\244" },
-  { "fr", "French (Fran\303\247ais)" },
-  { "de", "German Gr\303\274\303\237 Gott" },
-  { "he", "Hebrew   \327\251\327\234\327\225\327\235" },
-  { "it", "Italiano  Ciao, Buon giorno" },
-  { "ja", "Japanese (\346\227\245\346\234\254\350\252\236) \343\201\223\343\202\223\343\201\253\343\201\241\343\201\257, \357\275\272\357\276\235\357\276\206\357\276\201\357\276\212" },
-  { "ko", "Korean (\355\225\234\352\270\200)   \354\225\210\353\205\225\355\225\230\354\204\270\354\232\224, \354\225\210\353\205\225\355\225\230\354\213\255\353\213\210\352\271\214" },
-  { "mt", "Maltese   \304\212aw, Sa\304\247\304\247a" },
-  { "nl", "Nederlands, Vlaams Hallo, Dag" },
-  { "no", "Norwegian (Norsk) Hei, God dag" },
-  { "pl", "Polish   Dzie\305\204 dobry, Hej" },
-  { "ru", "Russian (\320\240\321\203\321\201\321\201\320\272\320\270\320\271)" },
-  { "sk", "Slovak   Dobr\303\275 de\305\210" },
-  { "sv", "Swedish (Svenska) Hej p\303\245 dej, Goddag" },
-  { "tr", "Turkish (T\303\274rk\303\247e) Merhaba" },
-  { "zh", "Chinese (\344\270\255\346\226\207,\346\231\256\351\200\232\350\257\235,\346\261\211\350\257\255)" }
+#define LANGUAGE(id, source, sample) {G_STRINGIFY(id),	G_STRUCT_OFFSET(union _LangPool, POOLSTRFIELD(__LINE__))},
+#include "pango-language-sample-table.h"
+#undef LANGUAGE
 };
 
 /**
@@ -406,9 +397,9 @@
 				     lang_info_compare);
 
       if (lang_info)
-	result = lang_info->str;
+	result = lang_pool.str + lang_info->offset;
       else
-	result = "French (Fran\303\247ais)";     /* Assume iso-8859-1 */
+	result = "The quick brown fox jumps over the lazy dog.";
     }
   else
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]