mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1201533 - Remove the GetEastAsianWidth API and its supporting character-property data. r=smontagu
This commit is contained in:
parent
a0f898fc22
commit
464d68dda1
@ -18,7 +18,6 @@
|
||||
# NB: not all the files are actually needed; currently, we require
|
||||
# - UnicodeData.txt
|
||||
# - Scripts.txt
|
||||
# - EastAsianWidth.txt
|
||||
# - BidiMirroring.txt
|
||||
# - HangulSyllableType.txt
|
||||
# - ReadMe.txt (to record version/date of the UCD)
|
||||
@ -334,7 +333,6 @@ my %verticalOrientationCode = (
|
||||
my @script;
|
||||
my @category;
|
||||
my @combining;
|
||||
my @eaw;
|
||||
my @mirror;
|
||||
my @hangul;
|
||||
my @casemap;
|
||||
@ -510,37 +508,6 @@ while (<FH>) {
|
||||
}
|
||||
close FH;
|
||||
|
||||
# read EastAsianWidth.txt
|
||||
my %eawCode = (
|
||||
'A' => 0, # ; Ambiguous
|
||||
'F' => 1, # ; Fullwidth
|
||||
'H' => 2, # ; Halfwidth
|
||||
'N' => 3, # ; Neutral
|
||||
'NA'=> 4, # ; Narrow
|
||||
'W' => 5 # ; Wide
|
||||
);
|
||||
open FH, "< $ARGV[1]/EastAsianWidth.txt" or die "can't open UCD file EastAsianWidth.txt\n";
|
||||
push @versionInfo, "";
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
push @versionInfo, $_;
|
||||
last if /Date:/;
|
||||
}
|
||||
while (<FH>) {
|
||||
s/#.*//;
|
||||
if (m/([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))*\s*;\s*([^ ]+)/) {
|
||||
my $eaw = uc($3);
|
||||
warn "unknown EAW code $eaw" unless exists $eawCode{$eaw};
|
||||
$eaw = $eawCode{$eaw};
|
||||
my $start = hex "0x$1";
|
||||
my $end = (defined $2) ? hex "0x$2" : $start;
|
||||
for (my $i = $start; $i <= $end; ++$i) {
|
||||
$eaw[$i] = $eaw;
|
||||
}
|
||||
}
|
||||
}
|
||||
close FH;
|
||||
|
||||
# read BidiMirroring.txt
|
||||
my @offsets = ();
|
||||
push @offsets, 0;
|
||||
@ -773,14 +740,14 @@ sub sprintCharProps2
|
||||
{
|
||||
my $usv = shift;
|
||||
return sprintf("{%d,%d,%d,%d,%d,%d,%d},",
|
||||
$script[$usv], $eaw[$usv], $category[$usv],
|
||||
$script[$usv], 0, $category[$usv],
|
||||
$bidicategory[$usv], $xidmod[$usv], $numericvalue[$usv],
|
||||
$verticalOrientation[$usv]);
|
||||
}
|
||||
$type = q/
|
||||
struct nsCharProps2 {
|
||||
unsigned char mScriptCode:8;
|
||||
unsigned char mEAW:3;
|
||||
unsigned char mUnused:3;
|
||||
unsigned char mCategory:5;
|
||||
unsigned char mBidiCategory:5;
|
||||
unsigned char mXidmod:4;
|
||||
|
@ -35,10 +35,6 @@ inline nsIUGenCategory::nsUGenCategory GetGenCategory(uint32_t aCh) {
|
||||
return sDetailedToGeneralCategory[GetGeneralCategory(aCh)];
|
||||
}
|
||||
|
||||
inline uint8_t GetEastAsianWidth(uint32_t aCh) {
|
||||
return GetCharProps2(aCh).mEAW;
|
||||
}
|
||||
|
||||
inline uint8_t GetScriptCode(uint32_t aCh) {
|
||||
return GetCharProps2(aCh).mScriptCode;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created on Mon Jul 13 19:06:12 2015 from UCD data files with version info:
|
||||
* Created on Thu Sep 3 14:42:28 2015 from UCD data files with version info:
|
||||
*
|
||||
|
||||
# Date: 2015-06-16, 20:24:00 GMT [KW]
|
||||
@ -35,9 +35,6 @@ Standard.
|
||||
# Scripts-8.0.0.txt
|
||||
# Date: 2015-03-11, 22:29:42 GMT [MD]
|
||||
|
||||
# EastAsianWidth-8.0.0.txt
|
||||
# Date: 2015-02-10, 21:00:00 GMT [KW, LI]
|
||||
|
||||
# BidiMirroring-8.0.0.txt
|
||||
# Date: 2015-01-20, 18:30:00 GMT [KW, LI]
|
||||
|
||||
@ -75,7 +72,7 @@ struct nsCharProps1 {
|
||||
|
||||
struct nsCharProps2 {
|
||||
unsigned char mScriptCode:8;
|
||||
unsigned char mEAW:3;
|
||||
unsigned char mUnused:3;
|
||||
unsigned char mCategory:5;
|
||||
unsigned char mBidiCategory:5;
|
||||
unsigned char mXidmod:4;
|
||||
|
Loading…
Reference in New Issue
Block a user