summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-28 23:14:05 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-28 23:14:05 +0000
commitd2c4e2127c12d3668caa2d52092411ba840b8fdb (patch)
tree9a617db8aaf7f21caf6b42a7eb2bfcb1904c1ba1
parent3932f8ef5723867ee726adcbc70b536317aa0f31 (diff)
downloadpango-d2c4e2127c12d3668caa2d52092411ba840b8fdb.tar.gz
Implement other tab alignments. Bug #325547, Itai Bar-Haim.
2006-01-28 Behdad Esfahbod <behdad@gnome.org> Implement other tab alignments. Bug #325547, Itai Bar-Haim. * docs/tmpl/tab-stops.sgml: Documented new tab alignment enum vals. * pango/pango-tabs.h, pango/pango-tabs.c: Added support for tab alignments PANGO_TAB_RIGHT and PANGO_TAB_CENTER. * examples/renderdemo.h, examples/renderdemo.c: Added support for --tab-spec. * examples/GLASS.utf8, examples/HELLO.utf8: Cleaned up tabs.
-rw-r--r--ChangeLog14
-rw-r--r--docs/tmpl/tab-stops.sgml2
-rw-r--r--examples/GLASS.utf8318
-rw-r--r--examples/HELLO.utf842
-rw-r--r--examples/renderdemo.c82
-rw-r--r--examples/renderdemo.h1
-rw-r--r--pango/pango-layout.c51
-rw-r--r--pango/pango-tabs.c8
-rw-r--r--pango/pango-tabs.h6
9 files changed, 323 insertions, 201 deletions
diff --git a/ChangeLog b/ChangeLog
index 66a42190..e105a320 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2006-01-28 Behdad Esfahbod <behdad@gnome.org>
+ Implement other tab alignments. Bug #325547, Itai Bar-Haim.
+
+ * docs/tmpl/tab-stops.sgml: Documented new tab alignment enum vals.
+
+ * pango/pango-tabs.h, pango/pango-tabs.c: Added support for tab
+ alignments PANGO_TAB_RIGHT and PANGO_TAB_CENTER.
+
+ * examples/renderdemo.h, examples/renderdemo.c: Added support for
+ --tab-spec.
+
+ * examples/GLASS.utf8, examples/HELLO.utf8: Cleaned up tabs.
+
+2006-01-28 Behdad Esfahbod <behdad@gnome.org>
+
* doc/tmpl/opentype.sgml: Document PangoOTBuffer and PangoOTGlyph.
* pango/pango-ot-buffer.c, pango/pango-ot-info.c,
diff --git a/docs/tmpl/tab-stops.sgml b/docs/tmpl/tab-stops.sgml
index 757280ad..82954993 100644
--- a/docs/tmpl/tab-stops.sgml
+++ b/docs/tmpl/tab-stops.sgml
@@ -34,6 +34,8 @@ A #PangoTabAlign specifies where a tab stop appears relative to the text.
</para>
@PANGO_TAB_LEFT: the tab stop appears to the left of the text.
+@PANGO_TAB_RIGHT: the tab stop appears to the right of the text.
+@PANGO_TAB_CENTER: the tab stop appears to the center of the text.
<!-- ##### MACRO PANGO_TYPE_TAB_ALIGN ##### -->
<para>
diff --git a/examples/GLASS.utf8 b/examples/GLASS.utf8
index f85ba9f4..610b595e 100644
--- a/examples/GLASS.utf8
+++ b/examples/GLASS.utf8
@@ -9,162 +9,162 @@ to redistribute this file, with absolutely no warranty.
-Sanskrit: काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥
-Sanskrit (standard transcription): kācaṃ śaknomyattum; nopahinasti mām.
-Classical Greek: ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει.
-Greek: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.
-Etruscan: (NEEDED)
-Latin: Vitrum edere possum; mihi non nocet.
-Old French: Je puis mangier del voirre. Ne me nuit.
-French: Je peux manger du verre, ça ne me fait pas de mal.
-Provençal / Occitan: Pòdi manjar de veire, me nafrariá pas.
-Québécois: J'peux manger d'la vitre, ça m'fa pas mal.
-Walloon: Dji pou magnî do vêre, çoula m' freut nén må.
-Champenois: (NEEDED)
-Lorrain: (NEEDED)
-Picard: Ch'peux mingi du verre, cha m'foé mie n'ma.
-Corsican: (NEEDED)
-Kreyòl Ayisyen: Mwen kap manje vè, li pa blese'm.
-Basque: Kristala jan dezaket, ez dit minik ematen.
-Catalan: Puc menjar vidre que no em fa mal.
-Spanish: Puedo comer vidrio, no me hace daño.
-Aragones: Puedo minchar beire, no me'n fa mal .
-Galician: Eu podo xantar cristais e non cortarme.
-Portuguese: Posso comer vidro, não me faz mal.
-Brazilian Portuguese (7): Posso comer vidro, não me machuca.
-Caboverdiano: M' podê cumê vidru, ca ta maguâ-m'.
-Papiamentu: Ami por kome glas anto e no ta hasimi daño.
-Italian: Posso mangiare il vetro e non mi fa male.
-Milanese: Sôn bôn de magnà el véder, el me fa minga mal.
-Roman: Me posso magna' er vetro, e nun me fa male.
-Napoletano: M' pozz magna' o'vetr, e nun m' fa mal.
-Sicilian: Puotsu mangiari u vitru, nun mi fa mali.
-Venetian: Mi posso magnare el vetro, no'l me fa mae.
-Zeneise (Genovese): Pòsso mangiâ o veddro e o no me fà mâ.
-Rheto-Romance / Romansch: (NEEDED)
-Romany / Tsigane: (NEEDED)
-Romanian: Pot să mănânc sticlă și ea nu mă rănește.
-Esperanto: Mi povas manĝi vitron, ĝi ne damaĝas min.
-Pictish: (NEEDED)
-Breton: (NEEDED)
-Cornish: Mý a yl dybry gwéder hag éf ny wra ow ankenya.
-Welsh: Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi.
-Manx Gaelic: Foddym gee glonney agh cha jean eh gortaghey mee.
-Old Irish (Ogham): ᚛᚛ᚉᚑᚅᚔᚉᚉᚔᚋ ᚔᚈᚔ ᚍᚂᚐᚅᚑ ᚅᚔᚋᚌᚓᚅᚐ᚜
-Old Irish (Latin): Con·iccim ithi nglano. Ním·géna.
-Irish: Is féidir liom gloinne a ithe. Ní dhéanann sí dochar ar bith dom.
-Scottish Gaelic: S urrainn dhomh gloinne ithe; cha ghoirtich i mi.
-Anglo-Saxon (Runes): ᛁᚳ᛫ᛗᚨᚷ᛫ᚷᛚᚨᛋ᛫ᛖᚩᛏᚪᚾ᛫ᚩᚾᛞ᛫ᚻᛁᛏ᛫ᚾᛖ᛫ᚻᛖᚪᚱᛗᛁᚪᚧ᛫ᛗᛖ᛬
-Anglo-Saxon (Latin): Ic mæg glæs eotan ond hit ne hearmiað me.
-Middle English: Ich canne glas eten and hit hirtiþ me nouȝt.
-English: I can eat glass and it doesn't hurt me.
-English (IPA): [aɪ kæn iːt glɑːs ænd ɪt dɐz nɒt hɜːt miː] (Received Pronunciation)
-English (Braille): ⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑
-Lalland Scots / Doric: Ah can eat gless, it disnae hurt us.
-Glaswegian: (NEEDED)
-Gothic (4): 𐌼𐌰𐌲 𐌲𐌻𐌴𐍃 𐌹̈𐍄𐌰𐌽, 𐌽𐌹 𐌼𐌹𐍃 𐍅𐌿 𐌽𐌳𐌰𐌽 𐌱𐍂𐌹𐌲𐌲𐌹𐌸.
-Old Norse (Runes): ᛖᚴ ᚷᛖᛏ ᛖᛏᛁ ᚧ ᚷᛚᛖᚱ ᛘᚾ ᚦᛖᛋᛋ ᚨᚧ ᚡᛖ ᚱᚧᚨ ᛋᚨᚱ
-Old Norse (Latin): Ek get etið gler án þess að verða sár.
-Norsk / Norwegian (Nynorsk): Eg kan eta glas utan å skada meg.
-Norsk / Norwegian (Bokmål): Jeg kan spise glass uten å skade meg.
-Føroyskt / Faroese: (NEEDED)
-Íslenska / Icelandic: Ég get etið gler án þess að meiða mig.
-Svenska / Swedish: Jag kan äta glas utan att skada mig.
-Dansk / Danish: Jeg kan spise glas, det gør ikke ondt på mig.
-Soenderjysk: Æ ka æe glass uhen at det go mæ naue.
-Frysk / Frisian: Ik kin glês ite, it docht me net sear.
-Nederlands / Dutch: Ik kan glas eten, het doet mij geen kwaad.
-Kirchröadsj/Bôchesserplat: Iech ken glaas èèse, mer 't deet miech jing pieng.
-Afrikaans: Ek kan glas eet, maar dit doen my nie skade nie.
-Lëtzebuergescht / Luxemburgish: Ech kan Glas iessen, daat deet mir nët wei.
-Deutsch / German: Ich kann Glas essen, ohne mir weh zu tun.
-Ruhrdeutsch: Ich kann Glas verkasematuckeln, ohne dattet mich wat jucken tut.
-Lausitzer Mundart ("Lusatian"): Ich koann Gloos assn und doas dudd merr ni wii.
-Odenwälderisch: Iech konn glaasch voschbachteln ohne dass es mir ebbs daun doun dud.
-Sächsisch / Saxon: 'sch kann Glos essn, ohne dass'sch mer wehtue.
-Pfälzisch: Isch konn Glass fresse ohne dasses mer ebbes ausmache dud.
-Schwäbisch / Swabian: I kå Glas frässa, ond des macht mr nix!
-Bayrisch / Bavarian: I koh Glos esa, und es duard ma ned wei.
-Allemannisch: I kaun Gloos essen, es tuat ma ned weh.
-Schwyzerdütsch: Ich chan Glaas ässe, das tuet mir nöd weeh.
-Hungarian: Meg tudom enni az üveget, nem lesz tőle bajom.
-Suomi / Finnish: Voin syödä lasia, se ei vahingoita minua.
-Sami (Northern): Sáhtán borrat lása, dat ii leat bávččas.
-Erzian: Мон ярсан суликадо, ды зыян эйстэнзэ а ули.
-Karelian: (NEEDED)
-Vepsian: (NEEDED)
-Votian: (NEEDED)
-Livonian: (NEEDED)
-Estonian: Ma võin klaasi süüa, see ei tee mulle midagi.
-Latvian: Es varu ēst stiklu, tas man nekaitē.
-Lithuanian: Aš galiu valgyti stiklą ir jis manęs nežeidžia
-Old Prussian: (NEEDED)
-Sorbian (Wendish): (NEEDED)
-Czech: Mohu jíst sklo, neublíží mi.
-Slovak: Môžem jesť sklo. Nezraní ma.
-Polska / Polish: Mogę jeść szkło i mi nie szkodzi.
-Slovenian: Lahko jem steklo, ne da bi mi škodovalo.
-Croatian: Ja mogu jesti staklo i ne boli me.
-Serbian (Latin): Mogu jesti staklo a da mi ne škodi.
-Serbian (Cyrillic): Могу јести стакло а да ми не шкоди.
-Macedonian: Можам да јадам стакло, а не ме штета.
-Russian: Я могу есть стекло, оно мне не вредит.
-Belarusian (Cyrillic): Я магу есці шкло, яно мне не шкодзіць.
-Belarusian (Lacinka): Ja mahu jeści škło, jano mne ne škodzić.
-Ukrainian: Я можу їсти шкло, й воно мені не пошкодить.
-Bulgarian: Мога да ям стъкло, то не ми вреди.
-Georgian: მინას ვჭამ და არა მტკივა.
-Armenian: Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
-Albanian: Unë mund të ha qelq dhe nuk më gjen gjë.
-Turkish: Cam yiyebilirim, bana zararı dokunmaz.
-Turkish (Ottoman): جام ييه بلورم بڭا ضررى طوقونمز
-Bangla / Bengali: আমি কাঁচ খেতে পারি, তাতে আমার কোনো ক্ষতি হয় না।
-Marathi: मी काच खाऊ शकतो, मला ते दुखत नाही.
-Hindi: मैं काँच खा सकता हूँ, मुझे उस से कोई पीडा नहीं होती.
-Tamil: நான் கண்ணாடி சாப்பிடுவேன், அதனால் எனக்கு ஒரு கேடும் வராது.
-Urdu(2): میں کانچ کھا سکتا ہوں اور مجھے تکلیف نہیں ہوتی ۔
-Pashto(2): زه شيشه خوړلې شم، هغه ما نه خوږوي
-Farsi / Persian: .من می توانم بدونِ احساس درد شيشه بخورم
-Arabic(2): أنا قادر على أكل الزجاج و هذا لا يؤلمني.
-Aramaic: (NEEDED)
-Hebrew(2): אני יכול לאכול זכוכית וזה לא מזיק לי.
-Yiddish(2): איך קען עסן גלאָז און עס טוט מיר נישט װײ.
-Judeo-Arabic: (NEEDED)
-Ladino: (NEEDED)
-Gǝʼǝz: (NEEDED)
-Amharic: (NEEDED)
-Twi: Metumi awe tumpan, ɜnyɜ me hwee.
-Hausa (Latin): Inā iya taunar gilāshi kuma in gamā lāfiyā.
-Hausa (Ajami) (2): إِنا إِىَ تَونَر غِلَاشِ كُمَ إِن غَمَا لَافِىَا
-Yoruba(3): Mo lè je̩ dígí, kò ní pa mí lára.
-(Ki)Swahili: Naweza kula bilauri na sikunyui.
-Malay: Saya boleh makan kaca dan ia tidak mencederakan saya.
-Tagalog: Kaya kong kumain nang bubog at hindi ako masaktan.
-Chamorro: Siña yo' chumocho krestat, ti ha na'lalamen yo'.
-Javanese: Aku isa mangan beling tanpa lara.
-Burmese: (NEEDED)
-Vietnamese (quốc ngữ): Tôi có thể ăn thủy tinh mà không hại gì.
-Vietnamese (nôm) (4): 些 𣎏 世 咹 水 晶 𦓡 空 𣎏 害 咦
-Khmer: (NEEDED)
-Lao: (NEEDED)
-Thai: ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ
-Mongolian (Cyrillic): Би шил идэй чадна, надад хортой биш
-Mongolian (Classic) (5): ᠪᠢ ᠰᠢᠯᠢ ᠢᠳᠡᠶᠦ ᠴᠢᠳᠠᠨᠠ ᠂ ᠨᠠᠳᠤᠷ ᠬᠣᠤᠷᠠᠳᠠᠢ ᠪᠢᠰᠢ
-Dzongkha: (NEEDED)
-Nepali: (NEEDED)
-Tibetan: ཤེལ་སྒོ་ཟ་ནས་ང་ན་གི་མ་རེད།
-Chinese: 我能吞下玻璃而不伤身体。
-Chinese (Traditional): 我能吞下玻璃而不傷身體。
-Taiwanese(6): Góa ē-tàng chia̍h po-lê, mā bē tio̍h-siong.
-Japanese: 私はガラスを食べられます。それは私を傷つけません。
-Korean: 나는 유리를 먹을 수 있어요. 그래도 아프지 않아요
-Bislama: Mi save kakae glas, hemi no save katem mi.
-Hawaiian: Hiki iaʻu ke ʻai i ke aniani; ʻaʻole nō lā au e ʻeha.
-Marquesan: E koʻana e kai i te karahi, mea ʻā, ʻaʻe hauhau.
-Chinook Jargon: Naika məkmək kakshət labutay, pi weyk ukuk munk-sik nay.
-Navajo: Tsésǫʼ yishą́ągo bííníshghah dóó doo shił neezgai da.
-Cherokee (and Cree, Ojibwa, Inuktitut, and other Native American languages): (NEEDED)
-Garifuna: (NEEDED)
-Gullah: (NEEDED)
-Lojban: mi kakne le nu citka le blaci .iku'i le se go'i na xrani mi
-Nórdicg: Ljœr ye caudran créneþ ý jor cẃran.
+Sanskrit: काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥
+Sanskrit (standard transcription): kācaṃ śaknomyattum; nopahinasti mām.
+Classical Greek: ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει.
+Greek: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.
+Etruscan: (NEEDED)
+Latin: Vitrum edere possum; mihi non nocet.
+Old French: Je puis mangier del voirre. Ne me nuit.
+French: Je peux manger du verre, ça ne me fait pas de mal.
+Provençal / Occitan: Pòdi manjar de veire, me nafrariá pas.
+Québécois: J'peux manger d'la vitre, ça m'fa pas mal.
+Walloon: Dji pou magnî do vêre, çoula m' freut nén må.
+Champenois: (NEEDED)
+Lorrain: (NEEDED)
+Picard: Ch'peux mingi du verre, cha m'foé mie n'ma.
+Corsican: (NEEDED)
+Kreyòl Ayisyen: Mwen kap manje vè, li pa blese'm.
+Basque: Kristala jan dezaket, ez dit minik ematen.
+Catalan: Puc menjar vidre que no em fa mal.
+Spanish: Puedo comer vidrio, no me hace daño.
+Aragones: Puedo minchar beire, no me'n fa mal .
+Galician: Eu podo xantar cristais e non cortarme.
+Portuguese: Posso comer vidro, não me faz mal.
+Brazilian Portuguese (7): Posso comer vidro, não me machuca.
+Caboverdiano: M' podê cumê vidru, ca ta maguâ-m'.
+Papiamentu: Ami por kome glas anto e no ta hasimi daño.
+Italian: Posso mangiare il vetro e non mi fa male.
+Milanese: Sôn bôn de magnà el véder, el me fa minga mal.
+Roman: Me posso magna' er vetro, e nun me fa male.
+Napoletano: M' pozz magna' o'vetr, e nun m' fa mal.
+Sicilian: Puotsu mangiari u vitru, nun mi fa mali.
+Venetian: Mi posso magnare el vetro, no'l me fa mae.
+Zeneise (Genovese): Pòsso mangiâ o veddro e o no me fà mâ.
+Rheto-Romance / Romansch: (NEEDED)
+Romany / Tsigane: (NEEDED)
+Romanian: Pot să mănânc sticlă și ea nu mă rănește.
+Esperanto: Mi povas manĝi vitron, ĝi ne damaĝas min.
+Pictish: (NEEDED)
+Breton: (NEEDED)
+Cornish: Mý a yl dybry gwéder hag éf ny wra ow ankenya.
+Welsh: Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi.
+Manx Gaelic: Foddym gee glonney agh cha jean eh gortaghey mee.
+Old Irish (Ogham): ᚛᚛ᚉᚑᚅᚔᚉᚉᚔᚋ ᚔᚈᚔ ᚍᚂᚐᚅᚑ ᚅᚔᚋᚌᚓᚅᚐ᚜
+Old Irish (Latin): Con·iccim ithi nglano. Ním·géna.
+Irish: Is féidir liom gloinne a ithe. Ní dhéanann sí dochar ar bith dom.
+Scottish Gaelic: S urrainn dhomh gloinne ithe; cha ghoirtich i mi.
+Anglo-Saxon (Runes): ᛁᚳ᛫ᛗᚨᚷ᛫ᚷᛚᚨᛋ᛫ᛖᚩᛏᚪᚾ᛫ᚩᚾᛞ᛫ᚻᛁᛏ᛫ᚾᛖ᛫ᚻᛖᚪᚱᛗᛁᚪᚧ᛫ᛗᛖ᛬
+Anglo-Saxon (Latin): Ic mæg glæs eotan ond hit ne hearmiað me.
+Middle English: Ich canne glas eten and hit hirtiþ me nouȝt.
+English: I can eat glass and it doesn't hurt me.
+English (IPA): [aɪ kæn iːt glɑːs ænd ɪt dɐz nɒt hɜːt miː] (Received Pronunciation)
+English (Braille): ⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑
+Lalland Scots / Doric: Ah can eat gless, it disnae hurt us.
+Glaswegian: (NEEDED)
+Gothic (4): 𐌼𐌰𐌲 𐌲𐌻𐌴𐍃 𐌹̈𐍄𐌰𐌽, 𐌽𐌹 𐌼𐌹𐍃 𐍅𐌿 𐌽𐌳𐌰𐌽 𐌱𐍂𐌹𐌲𐌲𐌹𐌸.
+Old Norse (Runes): ᛖᚴ ᚷᛖᛏ ᛖᛏᛁ ᚧ ᚷᛚᛖᚱ ᛘᚾ ᚦᛖᛋᛋ ᚨᚧ ᚡᛖ ᚱᚧᚨ ᛋᚨᚱ
+Old Norse (Latin): Ek get etið gler án þess að verða sár.
+Norsk / Norwegian (Nynorsk): Eg kan eta glas utan å skada meg.
+Norsk / Norwegian (Bokmål): Jeg kan spise glass uten å skade meg.
+Føroyskt / Faroese: (NEEDED)
+Íslenska / Icelandic: Ég get etið gler án þess að meiða mig.
+Svenska / Swedish: Jag kan äta glas utan att skada mig.
+Dansk / Danish: Jeg kan spise glas, det gør ikke ondt på mig.
+Soenderjysk: Æ ka æe glass uhen at det go mæ naue.
+Frysk / Frisian: Ik kin glês ite, it docht me net sear.
+Nederlands / Dutch: Ik kan glas eten, het doet mij geen kwaad.
+Kirchröadsj/Bôchesserplat: Iech ken glaas èèse, mer 't deet miech jing pieng.
+Afrikaans: Ek kan glas eet, maar dit doen my nie skade nie.
+Lëtzebuergescht / Luxemburgish: Ech kan Glas iessen, daat deet mir nët wei.
+Deutsch / German: Ich kann Glas essen, ohne mir weh zu tun.
+Ruhrdeutsch: Ich kann Glas verkasematuckeln, ohne dattet mich wat jucken tut.
+Lausitzer Mundart ("Lusatian"): Ich koann Gloos assn und doas dudd merr ni wii.
+Odenwälderisch: Iech konn glaasch voschbachteln ohne dass es mir ebbs daun doun dud.
+Sächsisch / Saxon: 'sch kann Glos essn, ohne dass'sch mer wehtue.
+Pfälzisch: Isch konn Glass fresse ohne dasses mer ebbes ausmache dud.
+Schwäbisch / Swabian: I kå Glas frässa, ond des macht mr nix!
+Bayrisch / Bavarian: I koh Glos esa, und es duard ma ned wei.
+Allemannisch: I kaun Gloos essen, es tuat ma ned weh.
+Schwyzerdütsch: Ich chan Glaas ässe, das tuet mir nöd weeh.
+Hungarian: Meg tudom enni az üveget, nem lesz tőle bajom.
+Suomi / Finnish: Voin syödä lasia, se ei vahingoita minua.
+Sami (Northern): Sáhtán borrat lása, dat ii leat bávččas.
+Erzian: Мон ярсан суликадо, ды зыян эйстэнзэ а ули.
+Karelian: (NEEDED)
+Vepsian: (NEEDED)
+Votian: (NEEDED)
+Livonian: (NEEDED)
+Estonian: Ma võin klaasi süüa, see ei tee mulle midagi.
+Latvian: Es varu ēst stiklu, tas man nekaitē.
+Lithuanian: Aš galiu valgyti stiklą ir jis manęs nežeidžia
+Old Prussian: (NEEDED)
+Sorbian (Wendish): (NEEDED)
+Czech: Mohu jíst sklo, neublíží mi.
+Slovak: Môžem jesť sklo. Nezraní ma.
+Polska / Polish: Mogę jeść szkło i mi nie szkodzi.
+Slovenian: Lahko jem steklo, ne da bi mi škodovalo.
+Croatian: Ja mogu jesti staklo i ne boli me.
+Serbian (Latin): Mogu jesti staklo a da mi ne škodi.
+Serbian (Cyrillic): Могу јести стакло а да ми не шкоди.
+Macedonian: Можам да јадам стакло, а не ме штета.
+Russian: Я могу есть стекло, оно мне не вредит.
+Belarusian (Cyrillic): Я магу есці шкло, яно мне не шкодзіць.
+Belarusian (Lacinka): Ja mahu jeści škło, jano mne ne škodzić.
+Ukrainian: Я можу їсти шкло, й воно мені не пошкодить.
+Bulgarian: Мога да ям стъкло, то не ми вреди.
+Georgian: მინას ვჭამ და არა მტკივა.
+Armenian: Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
+Albanian: Unë mund të ha qelq dhe nuk më gjen gjë.
+Turkish: Cam yiyebilirim, bana zararı dokunmaz.
+Turkish (Ottoman): جام ييه بلورم بڭا ضررى طوقونمز
+Bangla / Bengali: আমি কাঁচ খেতে পারি, তাতে আমার কোনো ক্ষতি হয় না।
+Marathi: मी काच खाऊ शकतो, मला ते दुखत नाही.
+Hindi: मैं काँच खा सकता हूँ, मुझे उस से कोई पीडा नहीं होती.
+Tamil: நான் கண்ணாடி சாப்பிடுவேன், அதனால் எனக்கு ஒரு கேடும் வராது.
+Urdu(2): میں کانچ کھا سکتا ہوں اور مجھے تکلیف نہیں ہوتی ۔
+Pashto(2): زه شيشه خوړلې شم، هغه ما نه خوږوي
+Farsi / Persian: .من می توانم بدونِ احساس درد شيشه بخورم
+Arabic(2): أنا قادر على أكل الزجاج و هذا لا يؤلمني.
+Aramaic: (NEEDED)
+Hebrew(2): אני יכול לאכול זכוכית וזה לא מזיק לי.
+Yiddish(2): איך קען עסן גלאָז און עס טוט מיר נישט װײ.
+Judeo-Arabic: (NEEDED)
+Ladino: (NEEDED)
+Gǝʼǝz: (NEEDED)
+Amharic: (NEEDED)
+Twi: Metumi awe tumpan, ɜnyɜ me hwee.
+Hausa (Latin): Inā iya taunar gilāshi kuma in gamā lāfiyā.
+Hausa (Ajami) (2): إِنا إِىَ تَونَر غِلَاشِ كُمَ إِن غَمَا لَافِىَا
+Yoruba(3): Mo lè je̩ dígí, kò ní pa mí lára.
+(Ki)Swahili: Naweza kula bilauri na sikunyui.
+Malay: Saya boleh makan kaca dan ia tidak mencederakan saya.
+Tagalog: Kaya kong kumain nang bubog at hindi ako masaktan.
+Chamorro: Siña yo' chumocho krestat, ti ha na'lalamen yo'.
+Javanese: Aku isa mangan beling tanpa lara.
+Burmese: (NEEDED)
+Vietnamese (quốc ngữ): Tôi có thể ăn thủy tinh mà không hại gì.
+Vietnamese (nôm) (4): 些 𣎏 世 咹 水 晶 𦓡 空 𣎏 害 咦
+Khmer: (NEEDED)
+Lao: (NEEDED)
+Thai: ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ
+Mongolian (Cyrillic): Би шил идэй чадна, надад хортой биш
+Mongolian (Classic) (5): ᠪᠢ ᠰᠢᠯᠢ ᠢᠳᠡᠶᠦ ᠴᠢᠳᠠᠨᠠ ᠂ ᠨᠠᠳᠤᠷ ᠬᠣᠤᠷᠠᠳᠠᠢ ᠪᠢᠰᠢ
+Dzongkha: (NEEDED)
+Nepali: (NEEDED)
+Tibetan: ཤེལ་སྒོ་ཟ་ནས་ང་ན་གི་མ་རེད།
+Chinese: 我能吞下玻璃而不伤身体。
+Chinese (Traditional): 我能吞下玻璃而不傷身體。
+Taiwanese(6): Góa ē-tàng chia̍h po-lê, mā bē tio̍h-siong.
+Japanese: 私はガラスを食べられます。それは私を傷つけません。
+Korean: 나는 유리를 먹을 수 있어요. 그래도 아프지 않아요
+Bislama: Mi save kakae glas, hemi no save katem mi.
+Hawaiian: Hiki iaʻu ke ʻai i ke aniani; ʻaʻole nō lā au e ʻeha.
+Marquesan: E koʻana e kai i te karahi, mea ʻā, ʻaʻe hauhau.
+Chinook Jargon: Naika məkmək kakshət labutay, pi weyk ukuk munk-sik nay.
+Navajo: Tsésǫʼ yishą́ągo bííníshghah dóó doo shił neezgai da.
+Cherokee (and Cree, Ojibwa, Inuktitut, and other Native American languages): (NEEDED)
+Garifuna: (NEEDED)
+Gullah: (NEEDED)
+Lojban: mi kakne le nu citka le blaci .iku'i le se go'i na xrani mi
+Nórdicg: Ljœr ye caudran créneþ ý jor cẃran.
diff --git a/examples/HELLO.utf8 b/examples/HELLO.utf8
index 813c087c..741d3917 100644
--- a/examples/HELLO.utf8
+++ b/examples/HELLO.utf8
@@ -9,43 +9,43 @@ Its purpose is to illustrate a number of scripts.
Arabic السَّلام عليكُم
Bengali (বাঙ্লা) ষাগতোম
Burmese (မ္ရန္မာ)
-Cherokee (ᏣᎳᎩ) ᎣᏏᏲ
-Czech (česky) Dobrý den
-Danish (Dansk) Hej, Goddag
+Cherokee (ᏣᎳᎩ) ᎣᏏᏲ
+Czech (česky) Dobrý den
+Danish (Dansk) Hej, Goddag
English Hello
Esperanto Saluton
Estonian Tere, Tervist
FORTRAN PROGRAM
-Finnish (Suomi) Hei
-French (Français) Bonjour, Salut
-German (Deutsch Nord) Guten Tag
-German (Deutsch Süd) Grüß Gott
-Georgian (ქართველი) გამარჯობა
+Finnish (Suomi) Hei
+French (Français) Bonjour, Salut
+German (Deutsch Nord) Guten Tag
+German (Deutsch Süd) Grüß Gott
+Georgian (ქართველი) გამარჯობა
Gujarati (ગુજરાતિ)
-Greek (Ελληνικά) Γειά σας
+Greek (Ελληνικά) Γειά σας
Hebrew שלום
Hindi नमस्ते, नमस्कार।
Italiano Ciao, Buon giorno
ɪŋglɪʃ hɛləʊ
Maltese Ċaw, Saħħa
Nederlands, Vlaams Hallo, Dag
-Norwegian (Norsk) Hei, God dag
+Norwegian (Norsk) Hei, God dag
Punjabi (ਪੁਂਜਾਬਿ)
Polish Dzień dobry, Hej
-Russian (Русский) Здравствуйте!
+Russian (Русский) Здравствуйте!
Slovak Dobrý deň
-Spanish (Español) ‎¡Hola!‎
-Swedish (Svenska) Hej, Goddag
-Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ
-Tamil (தமிழ்) வணக்கம்
-Turkish (Türkçe) Merhaba
-Vietnamese (Tiếng Việt) Xin Chào
+Spanish (Español) ‎¡Hola!‎
+Swedish (Svenska) Hej, Goddag
+Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ
+Tamil (தமிழ்) வணக்கம்
+Turkish (Türkçe) Merhaba
+Vietnamese (Tiếng Việt) Xin Chào
Yiddish ‏(ײַדישע) דאָס הײַזעלע
-Japanese (日本語) こんにちは, コンニチハ
-Chinese (中文,普通话,汉语) 你好
-Cantonese (粵語,廣東話) 早晨, 你好
-Korean (한글) 안녕하세요, 안녕하십니까
+Japanese (日本語) こんにちは, コンニチハ
+Chinese (中文,普通话,汉语) 你好
+Cantonese (粵語,廣東話) 早晨, 你好
+Korean (한글) 안녕하세요, 안녕하십니까
Difference among chinese characters in GB, JIS, KSC, BIG5:‎
GB -- 元气 开发
diff --git a/examples/renderdemo.c b/examples/renderdemo.c
index e225fe7e..155b7714 100644
--- a/examples/renderdemo.c
+++ b/examples/renderdemo.c
@@ -58,10 +58,14 @@ int opt_runs = 1;
PangoEllipsizeMode opt_ellipsize = PANGO_ELLIPSIZE_NONE;
HintMode opt_hinting = HINT_DEFAULT;
const char *opt_pangorc = NULL;
+const char *opt_tab_spec;
/* Text (or markup) to render */
static char *text;
+
+static PangoTabArray * parse_tab_spec (const char *p);
+
void
fail (const char *format, ...)
{
@@ -128,6 +132,15 @@ make_layout(PangoContext *context,
pango_font_description_free (font_description);
+ if (opt_tab_spec != NULL)
+ {
+ PangoTabArray *tabs;
+
+ tabs = parse_tab_spec (opt_tab_spec);
+ pango_layout_set_tabs (layout, tabs);
+ pango_tab_array_free (tabs);
+ }
+
return layout;
}
@@ -369,11 +382,6 @@ parse_hinting (ArgContext *arg_context,
const char *arg,
gpointer data)
{
- static GEnumClass *class = NULL;
-
- if (!class)
- class = g_type_class_ref (PANGO_TYPE_ELLIPSIZE_MODE);
-
if (strcmp (arg, "none") == 0)
opt_hinting = HINT_NONE;
else if (strcmp (arg, "auto") == 0)
@@ -384,6 +392,68 @@ parse_hinting (ArgContext *arg_context,
fail ("--hinting option must be one of none/auto/full");
}
+static PangoTabArray *
+parse_tab_spec (const char *p)
+{
+ PangoTabArray *tabs;
+ int tab_index;
+
+ tab_index = 0;
+ tabs = pango_tab_array_new (0, FALSE);
+
+ while (*p)
+ {
+ double pos;
+ int pos_units;
+ PangoTabAlign tab_align;
+ char *endpos;
+
+ pos = g_ascii_strtod (p, &endpos);
+ if (p == (const char *)endpos)
+ goto failed;
+ p = endpos;
+
+ pos_units = (pos * opt_dpi * PANGO_SCALE + 32) / 72;
+
+ switch (*p)
+ {
+ case 'c':
+ p++;
+ tab_align = PANGO_TAB_CENTER;
+ break;
+
+ case 'r':
+ p++;
+ tab_align = PANGO_TAB_RIGHT;
+ break;
+
+ case 'l':
+ p++;
+ tab_align = PANGO_TAB_LEFT;
+ break;
+
+ default:
+ break;
+ }
+
+ if (*p == ',')
+ p++;
+ else if (*p)
+ goto failed;
+
+ pango_tab_array_set_tab (tabs, tab_index, tab_align, pos_units);
+ tab_index++;
+ }
+
+ return tabs;
+
+failed:
+ fail ("invalid --tab-spec option.\n"
+ "A tab spec should consist of a comma-separated list of tab-stop\n"
+ "positions in points optionally followed by one of 'l', 'c', and 'r'.");
+ return NULL;
+}
+
void
parse_options (int argc, char *argv[])
{
@@ -422,6 +492,8 @@ parse_options (int argc, char *argv[])
ARG_INT, &opt_width, NULL },
{ "indent", "Width in points to indent paragraphs",
ARG_INT, &opt_indent, NULL },
+ { "tab-spec", "Tab stops and alignment in points, like '100l,300r,500c,700'",
+ ARG_STRING, &opt_tab_spec, NULL },
{ "runs", "Render text this many times",
ARG_INT, &opt_runs, NULL },
{ "pangorc", "pangorc file to use (default is ./pangorc if available)",
diff --git a/examples/renderdemo.h b/examples/renderdemo.h
index d79df1a6..acd4c46b 100644
--- a/examples/renderdemo.h
+++ b/examples/renderdemo.h
@@ -73,3 +73,4 @@ extern int opt_runs;
extern PangoEllipsizeMode opt_ellipsize;
extern HintMode opt_hinting;
extern const char *opt_pangorc;
+extern const char *opt_tab_spec;
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 50143387..5dc3a0ce 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -109,6 +109,8 @@ struct _PangoLayoutLinePrivate
{
PangoLayoutLine line;
guint ref_count;
+ PangoGlyphString *last_tab_glyph;
+ PangoTabAlign last_tab_alignment;
};
struct _PangoLayoutClass
@@ -2495,11 +2497,8 @@ ensure_tab_width (PangoLayout *layout)
}
}
-/* For now we only need the tab position, we assume
- * all tabs are left-aligned.
- */
static int
-get_tab_pos (PangoLayout *layout, int index)
+get_tab_pos (PangoLayout *layout, int index, PangoTabAlign *alignment)
{
gint n_tabs;
gboolean in_pixels;
@@ -2519,7 +2518,7 @@ get_tab_pos (PangoLayout *layout, int index)
{
gint pos = 0;
- pango_tab_array_get_tab (layout->tabs, index, NULL, &pos);
+ pango_tab_array_get_tab (layout->tabs, index, alignment, &pos);
if (in_pixels)
return pos * PANGO_SCALE;
@@ -2536,10 +2535,10 @@ get_tab_pos (PangoLayout *layout, int index)
int next_to_last_pos = 0;
int tab_width;
- pango_tab_array_get_tab (layout->tabs, n_tabs - 1, NULL, &last_pos);
+ pango_tab_array_get_tab (layout->tabs, n_tabs - 1, alignment, &last_pos);
if (n_tabs > 1)
- pango_tab_array_get_tab (layout->tabs, n_tabs - 2, NULL, &next_to_last_pos);
+ pango_tab_array_get_tab (layout->tabs, n_tabs - 2, alignment, &next_to_last_pos);
else
next_to_last_pos = 0;
@@ -2597,6 +2596,8 @@ shape_tab (PangoLayoutLine *line,
{
int i;
+ PangoTabAlign tab_alignment;
+
int current_width = line_width (line);
pango_glyph_string_set_size (glyphs, 1);
@@ -2610,13 +2611,16 @@ shape_tab (PangoLayoutLine *line,
for (i=0;;i++)
{
- int tab_pos = get_tab_pos (line->layout, i);
+ int tab_pos = get_tab_pos (line->layout, i, &tab_alignment);
if (tab_pos > current_width)
{
glyphs->glyphs[0].geometry.width = tab_pos - current_width;
break;
}
}
+ PangoLayoutLinePrivate *private = (PangoLayoutLinePrivate *)line;
+ private->last_tab_glyph = glyphs;
+ private->last_tab_alignment = tab_alignment;
}
static inline gboolean
@@ -2689,6 +2693,16 @@ struct _ParaBreakState
* to the remaining portion of the first item */
};
+static int
+glyphstring_width (PangoGlyphString* glyphs)
+{
+ int i;
+ int width = 0;
+ for (i=0; i < glyphs->num_glyphs; i++)
+ width += glyphs->glyphs[i].geometry.width;
+ return width;
+}
+
static PangoGlyphString *
shape_run (PangoLayoutLine *line,
ParaBreakState *state,
@@ -2701,6 +2715,10 @@ shape_run (PangoLayoutLine *line,
shape_tab (line, glyphs);
else
{
+ PangoLayoutLinePrivate *private = (PangoLayoutLinePrivate *)line;
+
+ g_return_val_if_fail (line != NULL, glyphs);
+
if (state->properties.shape_set)
imposed_shape (layout->text + item->offset, item->num_chars,
state->properties.shape_ink_rect, state->properties.shape_logical_rect,
@@ -2708,6 +2726,21 @@ shape_run (PangoLayoutLine *line,
else
pango_shape (layout->text + item->offset, item->length, &item->analysis, glyphs);
+ if (private->last_tab_glyph != NULL)
+ {
+ if (private->last_tab_glyph->num_glyphs > 0)
+ {
+ int w = private->last_tab_glyph->glyphs[0].geometry.width;
+ if (private->last_tab_alignment == PANGO_TAB_RIGHT)
+ w -= glyphstring_width (glyphs);
+ else if (private->last_tab_alignment == PANGO_TAB_CENTER)
+ w -= glyphstring_width (glyphs) / 2;
+
+ if (w < 0) w = 0;
+ private->last_tab_glyph->glyphs[0].geometry.width = w;
+ }
+ }
+
if (state->properties.letter_spacing)
{
PangoGlyphItem glyph_item;
@@ -4034,6 +4067,8 @@ pango_layout_line_new (PangoLayout *layout)
private->line.layout = layout;
private->line.runs = 0;
private->line.length = 0;
+ private->last_tab_glyph = NULL;
+ private->last_tab_alignment = PANGO_TAB_LEFT;
/* Note that we leave start_index, resolved_dir, and is_paragraph_start
* uninitialized */
diff --git a/pango/pango-tabs.c b/pango/pango-tabs.c
index aedd9bce..73343bc4 100644
--- a/pango/pango-tabs.c
+++ b/pango/pango-tabs.c
@@ -257,13 +257,12 @@ pango_tab_array_resize (PangoTabArray *tab_array,
/**
* pango_tab_array_set_tab:
* @tab_array: a #PangoTabArray
- * @tab_index: the index of a tab stop
+ * @tab_index: the index of a tab stop, starting from zero
* @alignment: tab alignment
* @location: tab location in Pango units
*
- * Sets the alignment and location of a tab stop.
- * @alignment must always be #PANGO_TAB_LEFT in the current
- * implementation.
+ * Sets the alignment and location of a tab stop. Resizes the
+ * tab array if needed.
*
**/
void
@@ -274,7 +273,6 @@ pango_tab_array_set_tab (PangoTabArray *tab_array,
{
g_return_if_fail (tab_array != NULL);
g_return_if_fail (tab_index >= 0);
- g_return_if_fail (alignment == PANGO_TAB_LEFT);
g_return_if_fail (location >= 0);
if (tab_index >= tab_array->size)
diff --git a/pango/pango-tabs.h b/pango/pango-tabs.h
index f60949e8..c2ec7eff 100644
--- a/pango/pango-tabs.h
+++ b/pango/pango-tabs.h
@@ -30,13 +30,13 @@ typedef struct _PangoTabArray PangoTabArray;
typedef enum
{
- PANGO_TAB_LEFT
+ PANGO_TAB_LEFT,
+ PANGO_TAB_RIGHT,
+ PANGO_TAB_CENTER
/* These are not supported now, but may be in the
* future.
*
- * PANGO_TAB_RIGHT,
- * PANGO_TAB_CENTER,
* PANGO_TAB_NUMERIC
*/
} PangoTabAlign;