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
520f07a4
Commit
520f07a4
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: Pre-base consonants need to be reordered like pre-base matras for scripts that have them.
parent
9a849038
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
indic.c
dlls/usp10/indic.c
+6
-1
shape.c
dlls/usp10/shape.c
+20
-0
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
No files found.
dlls/usp10/indic.c
View file @
520f07a4
...
@@ -239,6 +239,7 @@ static int FindBaseConsonant(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LP
...
@@ -239,6 +239,7 @@ static int FindBaseConsonant(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LP
{
{
int
i
;
int
i
;
BOOL
blwf
=
FALSE
;
BOOL
blwf
=
FALSE
;
BOOL
pref
=
FALSE
;
/* remove ralf from consideration */
/* remove ralf from consideration */
if
(
Consonent_is_ralf
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
))
if
(
Consonent_is_ralf
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
))
...
@@ -258,10 +259,13 @@ static int FindBaseConsonant(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LP
...
@@ -258,10 +259,13 @@ static int FindBaseConsonant(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LP
}
}
}
}
while
((
blwf
=
Consonent_is_below_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
))
||
Consonent_is_post_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
)
||
Consonent_is_pre_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
))
while
((
blwf
=
Consonent_is_below_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
))
||
Consonent_is_post_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
)
||
(
pref
=
Consonent_is_pre_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
)
))
{
{
if
(
blwf
&&
s
->
blwf
==
-
1
)
if
(
blwf
&&
s
->
blwf
==
-
1
)
s
->
blwf
=
s
->
base
-
1
;
s
->
blwf
=
s
->
base
-
1
;
if
(
pref
&&
s
->
pref
==
-
1
)
s
->
pref
=
s
->
base
-
1
;
for
(
i
=
s
->
base
-
1
;
i
>=
s
->
start
;
i
--
)
for
(
i
=
s
->
base
-
1
;
i
>=
s
->
start
;
i
--
)
if
(
is_consonant
(
lex
(
input
[
i
])
))
if
(
is_consonant
(
lex
(
input
[
i
])
))
{
{
...
@@ -310,6 +314,7 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
...
@@ -310,6 +314,7 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
(
*
syllables
)[
*
syllable_count
].
base
=
center
;
(
*
syllables
)[
*
syllable_count
].
base
=
center
;
(
*
syllables
)[
*
syllable_count
].
ralf
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
ralf
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
blwf
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
blwf
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
pref
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
end
=
next
-
1
;
(
*
syllables
)[
*
syllable_count
].
end
=
next
-
1
;
FindBaseConsonant
(
hdc
,
psa
,
psc
,
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
FindBaseConsonant
(
hdc
,
psa
,
psc
,
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
reorder_f
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
reorder_f
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
...
...
dlls/usp10/shape.c
View file @
520f07a4
...
@@ -1785,6 +1785,7 @@ static void Reorder_Ra_follows_matra(LPWSTR pwChar, IndicSyllable *s, lexical_fu
...
@@ -1785,6 +1785,7 @@ static void Reorder_Ra_follows_matra(LPWSTR pwChar, IndicSyllable *s, lexical_fu
s
->
ralf
=
loc
-
1
;
s
->
ralf
=
loc
-
1
;
s
->
base
-=
2
;
s
->
base
-=
2
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
-=
2
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
-=
2
;
if
(
s
->
pref
>=
0
)
s
->
pref
-=
2
;
}
}
}
}
...
@@ -1805,6 +1806,7 @@ static void Reorder_Ra_follows_syllable(LPWSTR pwChar, IndicSyllable *s, lexical
...
@@ -1805,6 +1806,7 @@ static void Reorder_Ra_follows_syllable(LPWSTR pwChar, IndicSyllable *s, lexical
s
->
ralf
=
s
->
end
-
1
;
s
->
ralf
=
s
->
end
-
1
;
s
->
base
-=
2
;
s
->
base
-=
2
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
-=
2
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
-=
2
;
if
(
s
->
pref
>=
0
)
s
->
pref
-=
2
;
}
}
}
}
...
@@ -1828,6 +1830,7 @@ static void Reorder_Matra_precede_base(LPWSTR pwChar, IndicSyllable *s, lexical_
...
@@ -1828,6 +1830,7 @@ static void Reorder_Matra_precede_base(LPWSTR pwChar, IndicSyllable *s, lexical_
if
(
s
->
ralf
>=
s
->
base
)
s
->
ralf
++
;
if
(
s
->
ralf
>=
s
->
base
)
s
->
ralf
++
;
if
(
s
->
blwf
>=
s
->
base
)
s
->
blwf
++
;
if
(
s
->
blwf
>=
s
->
base
)
s
->
blwf
++
;
if
(
s
->
pref
>=
s
->
base
)
s
->
pref
++
;
s
->
base
++
;
s
->
base
++
;
}
}
}
}
...
@@ -1854,6 +1857,7 @@ static void Reorder_Matra_precede_syllable(LPWSTR pwChar, IndicSyllable *s, lexi
...
@@ -1854,6 +1857,7 @@ static void Reorder_Matra_precede_syllable(LPWSTR pwChar, IndicSyllable *s, lexi
if
(
s
->
ralf
>=
0
)
s
->
ralf
++
;
if
(
s
->
ralf
>=
0
)
s
->
ralf
++
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
++
;
if
(
s
->
blwf
>=
0
)
s
->
blwf
++
;
if
(
s
->
pref
>=
0
)
s
->
pref
++
;
s
->
base
++
;
s
->
base
++
;
}
}
}
}
...
@@ -1907,6 +1911,19 @@ static void SecondReorder_Matra_precede_base(LPWSTR pwChar, IndicSyllable *s, WO
...
@@ -1907,6 +1911,19 @@ static void SecondReorder_Matra_precede_base(LPWSTR pwChar, IndicSyllable *s, WO
}
}
}
}
static
void
SecondReorder_Pref_precede_base
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
WORD
*
glyphs
,
IndicSyllable
*
g
,
lexical_function
lexical
)
{
if
(
s
->
pref
>=
0
&&
g
->
pref
>
g
->
base
)
{
int
j
;
WCHAR
og
=
glyphs
[
g
->
pref
];
TRACE
(
"Doing reorder of pref from %i to %i
\n
"
,
g
->
pref
,
g
->
base
);
for
(
j
=
g
->
pref
;
j
>
g
->
base
;
j
--
)
glyphs
[
j
]
=
glyphs
[
j
-
1
];
glyphs
[
g
->
base
]
=
og
;
}
}
static
void
Reorder_Like_Sinhala
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
static
void
Reorder_Like_Sinhala
(
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
{
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
...
@@ -1965,6 +1982,7 @@ static void SecondReorder_Like_Tamil(LPWSTR pwChar, IndicSyllable *s, WORD* pwGl
...
@@ -1965,6 +1982,7 @@ static void SecondReorder_Like_Tamil(LPWSTR pwChar, IndicSyllable *s, WORD* pwGl
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
SecondReorder_Matra_precede_base
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
SecondReorder_Matra_precede_base
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
SecondReorder_Pref_precede_base
(
pwChar
,
s
,
pwGlyphs
,
g
,
lexical
);
}
}
...
@@ -1983,6 +2001,8 @@ static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT i
...
@@ -1983,6 +2001,8 @@ static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT i
glyph_index
->
ralf
+=
shift
;
glyph_index
->
ralf
+=
shift
;
if
(
glyph_index
->
blwf
>
index
)
if
(
glyph_index
->
blwf
>
index
)
glyph_index
->
blwf
+=
shift
;
glyph_index
->
blwf
+=
shift
;
if
(
glyph_index
->
pref
>
index
)
glyph_index
->
pref
+=
shift
;
}
}
static
void
Apply_Indic_BasicForm
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwChars
,
INT
cChars
,
IndicSyllable
*
syllable
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
WORD
*
pwLogClust
,
lexical_function
lexical
,
IndicSyllable
*
glyph_index
,
const
GSUB_Feature
*
feature
)
static
void
Apply_Indic_BasicForm
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwChars
,
INT
cChars
,
IndicSyllable
*
syllable
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
WORD
*
pwLogClust
,
lexical_function
lexical
,
IndicSyllable
*
glyph_index
,
const
GSUB_Feature
*
feature
)
...
...
dlls/usp10/usp10_internal.h
View file @
520f07a4
...
@@ -101,6 +101,7 @@ typedef struct {
...
@@ -101,6 +101,7 @@ typedef struct {
INT
base
;
INT
base
;
INT
ralf
;
INT
ralf
;
INT
blwf
;
INT
blwf
;
INT
pref
;
INT
end
;
INT
end
;
}
IndicSyllable
;
}
IndicSyllable
;
...
...
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