Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9a849038
Commit
9a849038
authored
Jun 16, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Do matra second reorderings for Tamil and Malayalam to prevent blocking consonant ligatures.
parent
4a6364d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
9 deletions
+33
-9
shape.c
dlls/usp10/shape.c
+33
-9
No files found.
dlls/usp10/shape.c
View file @
9a849038
...
...
@@ -1884,6 +1884,29 @@ static void SecondReorder_Blwf_follows_matra(LPWSTR pwChar, IndicSyllable *s, WO
}
}
static
void
SecondReorder_Matra_precede_base
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
WORD
*
glyphs
,
IndicSyllable
*
g
,
lexical_function
lexical
)
{
int
i
;
/* reorder previously moved Matras to correct position*/
for
(
i
=
s
->
start
;
i
<
s
->
base
;
i
++
)
{
if
(
lexical
(
pwChar
[
i
])
==
lex_Matra_pre
)
{
int
j
;
int
g_start
=
g
->
start
+
i
-
s
->
start
;
if
(
g_start
<
g
->
base
-
1
)
{
WCHAR
og
=
glyphs
[
g_start
];
TRACE
(
"Doing reorder of matra from %i to %i
\n
"
,
g_start
,
g
->
base
);
for
(
j
=
g_start
;
j
<
g
->
base
-
1
;
j
++
)
glyphs
[
j
]
=
glyphs
[
j
+
1
];
glyphs
[
g
->
base
-
1
]
=
og
;
}
}
}
}
static
void
Reorder_Like_Sinhala
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
...
...
@@ -1924,26 +1947,27 @@ static void Reorder_Like_Kannada(LPWSTR pwChar, IndicSyllable *s, lexical_functi
Reorder_Matra_precede_syllable
(
pwChar
,
s
,
lexical
);
}
static
void
Reorder_Like_Malayalam
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
static
void
SecondReorder_Like_Telugu
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
WORD
*
pwGlyphs
,
IndicSyllable
*
g
,
lexical_function
lexical
)
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
TRACE
(
"Glyphs (%i..%i..%i)
\n
"
,
g
->
start
,
g
->
base
,
g
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_matra
(
pwChar
,
s
,
lexical
);
Reorder_Matra_precede_base
(
pwChar
,
s
,
lexical
);
SecondReorder_Blwf_follows_matra
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
}
static
void
SecondReorder_Like_T
elugu
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
WORD
*
pwGlyphs
,
IndicSyllable
*
g
,
lexical_function
lexical
)
static
void
SecondReorder_Like_T
amil
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
WORD
*
pwGlyphs
,
IndicSyllable
*
g
,
lexical_function
lexical
)
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
TRACE
(
"Glyphs (%i..%i..%i)
\n
"
,
g
->
start
,
g
->
base
,
g
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
SecondReorder_
Blwf_follows_matra
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
SecondReorder_
Matra_precede_base
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
}
static
inline
void
shift_syllable_glyph_indexs
(
IndicSyllable
*
glyph_index
,
INT
index
,
INT
shift
)
{
if
(
shift
==
0
)
...
...
@@ -2659,13 +2683,13 @@ static void ContextualShape_Tamil(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps
TRACE
(
"New composed string %s (%i)
\n
"
,
debugstr_wn
(
input
,
cCount
),
cCount
);
/* Step 2: Reorder within Syllables */
Indic_ReorderCharacters
(
hdc
,
psa
,
psc
,
input
,
cCount
,
&
syllables
,
&
syllable_count
,
tamil_lex
,
Reorder_Like_
Sinhala
);
Indic_ReorderCharacters
(
hdc
,
psa
,
psc
,
input
,
cCount
,
&
syllables
,
&
syllable_count
,
tamil_lex
,
Reorder_Like_
Bengali
);
TRACE
(
"reordered string %s
\n
"
,
debugstr_wn
(
input
,
cCount
));
GetGlyphIndicesW
(
hdc
,
input
,
cCount
,
pwOutGlyphs
,
0
);
*
pcGlyphs
=
cCount
;
/* Step 3: Base Form application to syllables */
ShapeIndicSyllables
(
hdc
,
psc
,
psa
,
input
,
cCount
,
syllables
,
syllable_count
,
pwOutGlyphs
,
pcGlyphs
,
pwLogClust
,
tamil_lex
,
NULL
);
ShapeIndicSyllables
(
hdc
,
psc
,
psa
,
input
,
cCount
,
syllables
,
syllable_count
,
pwOutGlyphs
,
pcGlyphs
,
pwLogClust
,
tamil_lex
,
SecondReorder_Like_Tamil
);
HeapFree
(
GetProcessHeap
(),
0
,
input
);
HeapFree
(
GetProcessHeap
(),
0
,
syllables
);
...
...
@@ -2848,13 +2872,13 @@ static void ContextualShape_Malayalam(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
TRACE
(
"New composed string %s (%i)
\n
"
,
debugstr_wn
(
input
,
cCount
),
cCount
);
/* Step 2: Reorder within Syllables */
Indic_ReorderCharacters
(
hdc
,
psa
,
psc
,
input
,
cCount
,
&
syllables
,
&
syllable_count
,
malayalam_lex
,
Reorder_Like_
Malayalam
);
Indic_ReorderCharacters
(
hdc
,
psa
,
psc
,
input
,
cCount
,
&
syllables
,
&
syllable_count
,
malayalam_lex
,
Reorder_Like_
Devanagari
);
TRACE
(
"reordered string %s
\n
"
,
debugstr_wn
(
input
,
cCount
));
GetGlyphIndicesW
(
hdc
,
input
,
cCount
,
pwOutGlyphs
,
0
);
*
pcGlyphs
=
cCount
;
/* Step 3: Base Form application to syllables */
ShapeIndicSyllables
(
hdc
,
psc
,
psa
,
input
,
cCount
,
syllables
,
syllable_count
,
pwOutGlyphs
,
pcGlyphs
,
pwLogClust
,
malayalam_lex
,
NULL
);
ShapeIndicSyllables
(
hdc
,
psc
,
psa
,
input
,
cCount
,
syllables
,
syllable_count
,
pwOutGlyphs
,
pcGlyphs
,
pwLogClust
,
malayalam_lex
,
SecondReorder_Like_Tamil
);
HeapFree
(
GetProcessHeap
(),
0
,
input
);
HeapFree
(
GetProcessHeap
(),
0
,
syllables
);
...
...
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