freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] more Unicode character blocks for Indic autofitting


From: suzuki toshiya
Subject: Re: [ft-devel] more Unicode character blocks for Indic autofitting
Date: Thu, 21 Apr 2011 18:54:33 +0900
User-agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)

Dear Werner,

I propose following update as the minimum & back-compatible
patch for next release of FreeType2.

diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 488d546..057d851 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -84,6 +84,12 @@
     AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ),  /* why this? */
 #endif
     AF_UNIRANGE_REC( 0x0900UL, 0x0DFFUL),    /* Indic Range */
+    AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL),    /* Tibetan */
+    AF_UNIRANGE_REC( 0x1900UL, 0x194FUL),    /* Limbu */
+    AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL),    /* Sundanese */
+    AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL),    /* Meetei Mayak */
+    AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL),    /* Syloti Nagri */
+    AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL),  /* Sharada */
     AF_UNIRANGE_REC(      0UL,      0UL)
   };

IMHO, I want to shrink Indic range because some of them don't
use hanging baseline. It is not only my personal opinion, also
SVG Text mentions about the difference of northern Indic and
southern Indic baseline:
http://www.w3.org/TR/SVG/text.html#FontsTablesBaselines
But yet I'm not sure which autofitter is appropriate to migrate
Indic scripts without hanging baseline (maybe latin, with
yet another charset to calculate blue zones?), so just I propose
the smallest patch to add unlisted scripts.

For my idea to exclude the script without hanging baseline,
please find attached longer patch.

Regards,
mpsuzuki

Werner LEMBERG wrote:
>> Following scripts are supposed to have hanging baseline typography.
>> I think Tibetan script should be handled by Indic autofitter.
> 
> Thanks for the info.  Please eventually provide a patch.  Right now, I
> will delay a change, so there is no hurry.
> 
> 
>    Werner

diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 488d546..e0dd97b 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -78,12 +78,65 @@
   /*************************************************************************/
 
 
+#define AF_INDIC_ONLY_BASELINE_HANGING
+
   static const AF_Script_UniRangeRec  af_indic_uniranges[] =
   {
 #if 0
     AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ),  /* why this? */
 #endif
-    AF_UNIRANGE_REC( 0x0900UL, 0x0DFFUL),    /* Indic Range */
+    AF_UNIRANGE_REC( 0x0900UL, 0x097FUL),    /* Devanagari */
+    AF_UNIRANGE_REC( 0x0980UL, 0x09FFUL),    /* Bengali */
+    AF_UNIRANGE_REC( 0x0A00UL, 0x0A7FUL),    /* Gurumukhi */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL),    /* Gujarati */
+    AF_UNIRANGE_REC( 0x0B00UL, 0x0B7FUL),    /* Oriya */
+    AF_UNIRANGE_REC( 0x0B80UL, 0x0BFFUL),    /* Tamil */
+    AF_UNIRANGE_REC( 0x0C00UL, 0x0C7FUL),    /* Telugu */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+    AF_UNIRANGE_REC( 0x0C80UL, 0x0CFFUL),    /* Kannada */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0x0D00UL, 0x0D7FUL),    /* Malayalam */
+
+    AF_UNIRANGE_REC( 0x0D80UL, 0x0DFFUL),    /* Sinhala */
+
+    /* Brahmic scripts in South East and Middle Asian */
+    AF_UNIRANGE_REC( 0x0E00UL, 0x0E7FUL),    /* Thai */
+    AF_UNIRANGE_REC( 0x0E80UL, 0x0EFFUL),    /* Lao */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+    AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL),    /* Tibetan */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0x1000UL, 0x109FUL),    /* Myanmar */
+    AF_UNIRANGE_REC( 0x1700UL, 0x171FUL),    /* Tagalog */
+    AF_UNIRANGE_REC( 0x1720UL, 0x173FUL),    /* Hanunoo */
+    AF_UNIRANGE_REC( 0x1740UL, 0x175FUL),    /* Buhid */
+    AF_UNIRANGE_REC( 0x1760UL, 0x177FUL),    /* Tagbanwa */
+    AF_UNIRANGE_REC( 0x1780UL, 0x17FFUL),    /* Khmer */
+    AF_UNIRANGE_REC( 0x18B0UL, 0x18FFUL),    /* Cham */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+    AF_UNIRANGE_REC( 0x1900UL, 0x194FUL),    /* Limbu */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0x1950UL, 0x197FUL),    /* Tai Le */
+    AF_UNIRANGE_REC( 0x1980UL, 0x19DFUL),    /* New Tai Lue */
+    AF_UNIRANGE_REC( 0x19E0UL, 0x19FFUL),    /* Khmer Symbol */
+    AF_UNIRANGE_REC( 0x1A00UL, 0x1A1FUL),    /* Buginese */
+    AF_UNIRANGE_REC( 0x1A20UL, 0x1AAFUL),    /* Tai Tham */
+    AF_UNIRANGE_REC( 0x1B00UL, 0x1B7FUL),    /* Balinese */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+    AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL),    /* Sundanese */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0x1C00UL, 0x1C4FUL),    /* Lepcha */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+    AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL),    /* Meetei Mayak */
+    AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL),    /* Syloti Nagri */
+#ifndef AF_INDIC_ONLY_BASELINE_HANGING
+    AF_UNIRANGE_REC( 0xA900UL, 0xA92FUL),    /* Kayah Li */
+    AF_UNIRANGE_REC( 0xA930UL, 0xA95FUL),    /* Rejang */
+    AF_UNIRANGE_REC( 0xA980UL, 0xA9FFUL),    /* Javanese */
+    AF_UNIRANGE_REC( 0xAA80UL, 0xAADFUL),    /* Tai Viet */
+    AF_UNIRANGE_REC( 0x11080UL, 0x110CFUL),    /* Kaithi */
+#endif /* AF_INDIC_ONLY_BASELINE_HANGING */
+
     AF_UNIRANGE_REC(      0UL,      0UL)
   };
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]