Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
57053fa5
Commit
57053fa5
authored
Aug 24, 2010
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Add Phags-pa Script.
parent
29d896e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
1 deletion
+93
-1
shape.c
dlls/usp10/shape.c
+87
-0
usp10.c
dlls/usp10/usp10.c
+5
-1
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
No files found.
dlls/usp10/shape.c
View file @
57053fa5
...
...
@@ -42,6 +42,7 @@ typedef VOID (*ContextualShapingProc)(HDC, ScriptCache*, SCRIPT_ANALYSIS*,
static
void
ContextualShape_Arabic
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Syriac
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Phags_pa
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
extern
const
unsigned
short
wine_shaping_table
[];
extern
const
unsigned
short
wine_shaping_forms
[
LAST_ARABIC_CHAR
-
FIRST_ARABIC_CHAR
+
1
][
4
];
...
...
@@ -332,6 +333,7 @@ static const ScriptShapeData ShapingData[] =
{{
sinhala_features
,
7
},
"sinh"
,
NULL
},
{{
tibetan_features
,
2
},
"tibt"
,
NULL
},
{{
tibetan_features
,
2
},
"tibt"
,
NULL
},
{{
tibetan_features
,
2
},
"phag"
,
ContextualShape_Phags_pa
},
};
static
INT
GSUB_is_glyph_covered
(
LPCVOID
table
,
UINT
glyph
)
...
...
@@ -1173,6 +1175,91 @@ right_join_causing(neighbour_joining_type(i,dirR,context_type,cChars,psa)))
HeapFree
(
GetProcessHeap
(),
0
,
context_type
);
}
/*
* ContextualShape_Phags_pa
*/
#define phags_pa_CANDRABINDU 0xA873
#define phags_pa_START 0xA840
#define phags_pa_END 0xA87F
static
void
ContextualShape_Phags_pa
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
)
{
INT
*
context_shape
;
INT
dirR
,
dirL
;
int
i
;
if
(
*
pcGlyphs
!=
cChars
)
{
ERR
(
"Number of Glyphs and Chars need to match at the beginning
\n
"
);
return
;
}
if
(
!
psa
->
fLogicalOrder
&&
psa
->
fRTL
)
{
dirR
=
1
;
dirL
=
-
1
;
}
else
{
dirR
=
-
1
;
dirL
=
1
;
}
if
(
!
psc
->
GSUB_Table
)
psc
->
GSUB_Table
=
load_gsub_table
(
hdc
);
if
(
!
psc
->
GSUB_Table
)
return
;
context_shape
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INT
)
*
cChars
);
for
(
i
=
0
;
i
<
cChars
;
i
++
)
{
if
(
pwcChars
[
i
]
>=
phags_pa_START
&&
pwcChars
[
i
]
<=
phags_pa_END
)
{
WCHAR
rchar
=
neighbour_char
(
i
,
dirR
,
pwcChars
,
cChars
);
WCHAR
lchar
=
neighbour_char
(
i
,
dirL
,
pwcChars
,
cChars
);
BOOL
jrchar
=
(
rchar
!=
phags_pa_CANDRABINDU
&&
rchar
>=
phags_pa_START
&&
rchar
<=
phags_pa_END
);
BOOL
jlchar
=
(
lchar
!=
phags_pa_CANDRABINDU
&&
lchar
>=
phags_pa_START
&&
lchar
<=
phags_pa_END
);
if
(
jrchar
&&
jlchar
)
context_shape
[
i
]
=
Xm
;
else
if
(
jrchar
)
context_shape
[
i
]
=
Xr
;
else
if
(
jlchar
)
context_shape
[
i
]
=
Xl
;
else
context_shape
[
i
]
=
Xn
;
}
else
context_shape
[
i
]
=
-
1
;
}
/* Contextual Shaping */
i
=
0
;
while
(
i
<
*
pcGlyphs
)
{
if
(
context_shape
[
i
]
>=
0
)
{
INT
nextIndex
;
INT
prevCount
=
*
pcGlyphs
;
nextIndex
=
apply_GSUB_feature_to_glyph
(
hdc
,
psa
,
psc
,
pwOutGlyphs
,
i
,
dirL
,
pcGlyphs
,
contextual_features
[
context_shape
[
i
]]);
if
(
nextIndex
>
GSUB_E_NOGLYPH
)
{
UpdateClusters
(
nextIndex
,
*
pcGlyphs
-
prevCount
,
dirL
,
cChars
,
pwLogClust
);
i
=
nextIndex
;
}
else
i
++
;
}
else
i
++
;
}
HeapFree
(
GetProcessHeap
(),
0
,
context_shape
);
}
void
SHAPE_ContextualShaping
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
)
{
if
(
ShapingData
[
psa
->
eScript
].
contextProc
)
...
...
dlls/usp10/usp10.c
View file @
57053fa5
...
...
@@ -100,6 +100,8 @@ static const scriptRange scriptRanges[] = {
/* Modifier Tone Letters: U+A700–U+A71F */
/* Latin Extended-D: U+A720–U+A7FF */
{
Script_Latin
,
0xa700
,
0xa7ff
,
0
,
0
},
/* Phags-pa: U+A840–U+A87F */
{
Script_Phags_pa
,
0xa840
,
0xa87f
,
0
,
0
},
/* Latin Ligatures: U+FB00–U+FB06 */
{
Script_Latin
,
0xfb00
,
0xfb06
,
0
,
0
},
/* Armenian ligatures U+FB13..U+FB17 */
...
...
@@ -160,6 +162,8 @@ static const scriptData scriptInformation[] = {
{
LANG_TIBETAN
,
0
,
1
,
1
,
1
,
DEFAULT_CHARSET
,
0
,
0
,
1
,
0
,
1
,
0
,
0
,
0
,
0
}},
{{
Script_Tibetan_Numeric
,
0
,
0
,
0
,
0
,
0
,
0
,
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}},
{
LANG_TIBETAN
,
1
,
1
,
0
,
0
,
DEFAULT_CHARSET
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}},
{{
Script_Phags_pa
,
0
,
0
,
0
,
0
,
0
,
0
,
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}},
{
LANG_MONGOLIAN
,
0
,
1
,
0
,
0
,
DEFAULT_CHARSET
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}},
};
static
const
SCRIPT_PROPERTIES
*
script_props
[]
=
...
...
@@ -173,7 +177,7 @@ static const SCRIPT_PROPERTIES *script_props[] =
&
scriptInformation
[
12
].
props
,
&
scriptInformation
[
13
].
props
,
&
scriptInformation
[
14
].
props
,
&
scriptInformation
[
15
].
props
,
&
scriptInformation
[
16
].
props
,
&
scriptInformation
[
17
].
props
,
&
scriptInformation
[
18
].
props
&
scriptInformation
[
18
].
props
,
&
scriptInformation
[
19
].
props
};
typedef
struct
{
...
...
dlls/usp10/usp10_internal.h
View file @
57053fa5
...
...
@@ -38,6 +38,7 @@
#define Script_Sinhala 16
#define Script_Tibetan 17
#define Script_Tibetan_Numeric 18
#define Script_Phags_pa 19
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment