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
5f22264c
Commit
5f22264c
authored
Jun 15, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Do not require a separate call to find Indic base consonant.
parent
35948c6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
27 deletions
+17
-27
indic.c
dlls/usp10/indic.c
+17
-16
shape.c
dlls/usp10/shape.c
+0
-10
usp10_internal.h
dlls/usp10/usp10_internal.h
+0
-1
No files found.
dlls/usp10/indic.c
View file @
5f22264c
...
...
@@ -212,6 +212,22 @@ static INT Indic_process_next_syllable( LPCWSTR input, INT cChar, INT start, INT
return
parse_consonant_syllable
(
input
,
cChar
,
start
,
main
,
next
,
lex
);
}
static
int
FindBaseConsonant
(
LPWSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
)
{
int
i
;
/* try to find a base consonant */
if
(
!
is_consonant
(
lex
(
input
[
s
->
base
])
))
{
for
(
i
=
s
->
end
;
i
>=
s
->
start
;
i
--
)
if
(
is_consonant
(
lex
(
input
[
i
])
))
{
s
->
base
=
i
;
break
;
}
}
return
s
->
base
;
}
void
Indic_ReorderCharacters
(
LPWSTR
input
,
int
cChar
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lex
,
reorder_function
reorder_f
)
{
int
index
=
0
;
...
...
@@ -242,6 +258,7 @@ void Indic_ReorderCharacters( LPWSTR input, int cChar, IndicSyllable **syllables
(
*
syllables
)[
*
syllable_count
].
start
=
index
;
(
*
syllables
)[
*
syllable_count
].
base
=
center
;
(
*
syllables
)[
*
syllable_count
].
end
=
next
-
1
;
FindBaseConsonant
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
reorder_f
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
index
=
next
;
*
syllable_count
=
(
*
syllable_count
)
+
1
;
...
...
@@ -262,19 +279,3 @@ void Indic_ReorderCharacters( LPWSTR input, int cChar, IndicSyllable **syllables
}
TRACE
(
"Processed %i of %i characters into %i syllables
\n
"
,
index
,
cChar
,
*
syllable_count
);
}
int
Indic_FindBaseConsonant
(
LPWSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
)
{
int
i
;
/* try to find a base consonant */
if
(
!
is_consonant
(
lex
(
input
[
s
->
base
])
))
{
for
(
i
=
s
->
end
;
i
>=
s
->
start
;
i
--
)
if
(
is_consonant
(
lex
(
input
[
i
])
))
{
s
->
base
=
i
;
break
;
}
}
return
s
->
base
;
}
dlls/usp10/shape.c
View file @
5f22264c
...
...
@@ -1956,8 +1956,6 @@ static void Reorder_Like_Sinhala(LPWSTR pwChar, IndicSyllable *s, lexical_functi
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
Indic_FindBaseConsonant
(
pwChar
,
s
,
lexical
);
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_base
(
pwChar
,
s
,
lexical
);
...
...
@@ -1968,8 +1966,6 @@ static void Reorder_Like_Devanagari(LPWSTR pwChar, IndicSyllable *s, lexical_fun
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
Indic_FindBaseConsonant
(
pwChar
,
s
,
lexical
);
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_matra
(
pwChar
,
s
,
lexical
);
...
...
@@ -1980,8 +1976,6 @@ static void Reorder_Like_Bengali(LPWSTR pwChar, IndicSyllable *s, lexical_functi
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
Indic_FindBaseConsonant
(
pwChar
,
s
,
lexical
);
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_base
(
pwChar
,
s
,
lexical
);
...
...
@@ -1992,8 +1986,6 @@ static void Reorder_Like_Kannada(LPWSTR pwChar, IndicSyllable *s, lexical_functi
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
Indic_FindBaseConsonant
(
pwChar
,
s
,
lexical
);
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_syllable
(
pwChar
,
s
,
lexical
);
...
...
@@ -2004,8 +1996,6 @@ static void Reorder_Like_Malayalam(LPWSTR pwChar, IndicSyllable *s, lexical_func
{
TRACE
(
"Syllable (%i..%i..%i)
\n
"
,
s
->
start
,
s
->
base
,
s
->
end
);
if
(
s
->
start
==
s
->
base
&&
s
->
base
==
s
->
end
)
return
;
Indic_FindBaseConsonant
(
pwChar
,
s
,
lexical
);
if
(
lexical
(
pwChar
[
s
->
base
])
==
lex_Vowel
)
return
;
Reorder_Ra_follows_matra
(
pwChar
,
s
,
lexical
);
...
...
dlls/usp10/usp10_internal.h
View file @
5f22264c
...
...
@@ -121,4 +121,3 @@ HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANA
void
SHAPE_CharGlyphProp
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
const
WCHAR
*
pwcChars
,
const
INT
cChars
,
const
WORD
*
pwGlyphs
,
const
INT
cGlyphs
,
WORD
*
pwLogClust
,
SCRIPT_CHARPROP
*
pCharProp
,
SCRIPT_GLYPHPROP
*
pGlyphProp
)
DECLSPEC_HIDDEN
;
void
Indic_ReorderCharacters
(
LPWSTR
input
,
int
cChars
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lexical_f
,
reorder_function
reorder_f
)
DECLSPEC_HIDDEN
;
int
Indic_FindBaseConsonant
(
LPWSTR
pwChar
,
IndicSyllable
*
syllable
,
lexical_function
lex
)
DECLSPEC_HIDDEN
;
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