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
ec23fe65
Commit
ec23fe65
authored
Oct 27, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: All glyphs in a single indic syllable are part of the same cluster.
parent
c83841ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
9 deletions
+46
-9
indic.c
dlls/usp10/indic.c
+24
-9
shape.c
dlls/usp10/shape.c
+21
-0
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
No files found.
dlls/usp10/indic.c
View file @
ec23fe65
...
...
@@ -71,7 +71,8 @@ static void debug_output_string(LPCWSTR str, int cChar, lexical_function f)
static
inline
BOOL
is_matra
(
int
type
)
{
return
(
type
==
lex_Matra_above
||
type
==
lex_Matra_below
||
type
==
lex_Matra_pre
||
type
==
lex_Matra_post
);
type
==
lex_Matra_pre
||
type
==
lex_Matra_post
||
type
==
lex_Composed_Vowel
);
}
static
inline
BOOL
is_joiner
(
int
type
)
...
...
@@ -207,7 +208,7 @@ static INT Indic_process_next_syllable( LPCWSTR input, INT cChar, INT start, INT
return
parse_consonant_syllable
(
input
,
cChar
,
start
,
main
,
next
,
lex
);
}
static
BOOL
Consonent_is_post_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
static
BOOL
Consonent_is_post_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LP
C
WSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
{
if
(
is_consonant
(
lexical
(
pwChar
[
s
->
base
]))
&&
s
->
base
>
s
->
start
&&
lexical
(
pwChar
[
s
->
base
-
1
])
==
lex_Halant
)
{
...
...
@@ -224,7 +225,7 @@ static BOOL Consonent_is_post_base_form(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCac
return
FALSE
;
}
static
BOOL
Consonent_is_below_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
static
BOOL
Consonent_is_below_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LP
C
WSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
{
if
(
is_consonant
(
lexical
(
pwChar
[
s
->
base
]))
&&
s
->
base
>
s
->
start
&&
lexical
(
pwChar
[
s
->
base
-
1
])
==
lex_Halant
)
{
...
...
@@ -241,7 +242,7 @@ static BOOL Consonent_is_below_base_form(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCa
return
FALSE
;
}
static
BOOL
Consonent_is_pre_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
static
BOOL
Consonent_is_pre_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LP
C
WSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
,
BOOL
modern
)
{
if
(
is_consonant
(
lexical
(
pwChar
[
s
->
base
]))
&&
s
->
base
>
s
->
start
&&
lexical
(
pwChar
[
s
->
base
-
1
])
==
lex_Halant
)
{
...
...
@@ -258,14 +259,14 @@ static BOOL Consonent_is_pre_base_form(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCach
return
FALSE
;
}
static
BOOL
Consonent_is_ralf
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
static
BOOL
Consonent_is_ralf
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LP
C
WSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
{
if
((
lexical
(
pwChar
[
s
->
start
])
==
lex_Ra
)
&&
s
->
end
>
s
->
start
&&
lexical
(
pwChar
[
s
->
start
+
1
])
==
lex_Halant
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
start
],
1
,
2
,
"rphf"
)
>
0
);
return
FALSE
;
}
static
int
FindBaseConsonant
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
,
BOOL
modern
)
static
int
FindBaseConsonant
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LP
C
WSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
,
BOOL
modern
)
{
int
i
;
BOOL
blwf
=
FALSE
;
...
...
@@ -313,7 +314,7 @@ static int FindBaseConsonant(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, LP
return
s
->
base
;
}
void
Indic_
ReorderCharacters
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
int
cChar
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lex
,
reorder_function
reorder_f
,
BOOL
modern
)
void
Indic_
ParseSyllables
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPCWSTR
input
,
const
int
cChar
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lex
,
BOOL
modern
)
{
int
index
=
0
;
int
next
=
0
;
...
...
@@ -321,7 +322,7 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
*
syllable_count
=
0
;
if
(
!
lex
||
!
reorder_f
)
if
(
!
lex
)
{
ERR
(
"Failure to have required functions
\n
"
);
return
;
...
...
@@ -349,7 +350,6 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
(
*
syllables
)[
*
syllable_count
].
pref
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
end
=
next
-
1
;
FindBaseConsonant
(
hdc
,
psa
,
psc
,
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
,
modern
);
reorder_f
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
index
=
next
;
*
syllable_count
=
(
*
syllable_count
)
+
1
;
}
...
...
@@ -361,3 +361,18 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
}
TRACE
(
"Processed %i of %i characters into %i syllables
\n
"
,
index
,
cChar
,
*
syllable_count
);
}
void
Indic_ReorderCharacters
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
int
cChar
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lex
,
reorder_function
reorder_f
,
BOOL
modern
)
{
int
i
;
if
(
!
reorder_f
)
{
ERR
(
"Failure to have required functions
\n
"
);
return
;
}
Indic_ParseSyllables
(
hdc
,
psa
,
psc
,
input
,
cChar
,
syllables
,
syllable_count
,
lex
,
modern
);
for
(
i
=
0
;
i
<
*
syllable_count
;
i
++
)
reorder_f
(
input
,
&
(
*
syllables
)[
i
],
lex
);
}
dlls/usp10/shape.c
View file @
ec23fe65
...
...
@@ -3213,6 +3213,9 @@ static void ShapeCharGlyphProp_Tibet( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS
static
void
ShapeCharGlyphProp_BaseIndic
(
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
,
lexical_function
lexical
)
{
int
i
,
k
;
IndicSyllable
*
syllables
=
NULL
;
int
syllable_count
=
0
;
BOOL
modern
=
get_GSUB_Indic2
(
psa
,
psc
);
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
{
...
...
@@ -3257,7 +3260,25 @@ static void ShapeCharGlyphProp_BaseIndic( HDC hdc, ScriptCache *psc, SCRIPT_ANAL
break
;
}
}
Indic_ParseSyllables
(
hdc
,
psa
,
psc
,
pwcChars
,
cChars
,
&
syllables
,
&
syllable_count
,
lexical
,
modern
);
for
(
i
=
0
;
i
<
syllable_count
;
i
++
)
{
int
j
;
WORD
g
=
pwLogClust
[
syllables
[
i
].
start
];
for
(
j
=
syllables
[
i
].
start
+
1
;
j
<=
syllables
[
i
].
end
;
j
++
)
{
if
(
pwLogClust
[
j
]
!=
g
)
{
pGlyphProp
[
pwLogClust
[
j
]].
sva
.
fClusterStart
=
0
;
pwLogClust
[
j
]
=
g
;
}
}
}
UpdateClustersFromGlyphProp
(
cGlyphs
,
cChars
,
pwLogClust
,
pGlyphProp
);
HeapFree
(
GetProcessHeap
(),
0
,
syllables
);
}
static
void
ShapeCharGlyphProp_Devanagari
(
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
)
...
...
dlls/usp10/usp10_internal.h
View file @
ec23fe65
...
...
@@ -136,5 +136,6 @@ void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const
INT
SHAPE_does_GSUB_feature_apply_to_chars
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
const
WCHAR
*
chars
,
INT
write_dir
,
INT
count
,
const
char
*
feature
)
DECLSPEC_HIDDEN
;
void
Indic_ReorderCharacters
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
int
cChars
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lexical_f
,
reorder_function
reorder_f
,
BOOL
modern
)
DECLSPEC_HIDDEN
;
void
Indic_ParseSyllables
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPCWSTR
input
,
const
int
cChar
,
IndicSyllable
**
syllables
,
int
*
syllable_count
,
lexical_function
lex
,
BOOL
modern
);
void
BREAK_line
(
const
WCHAR
*
chars
,
int
count
,
const
SCRIPT_ANALYSIS
*
sa
,
SCRIPT_LOGATTR
*
la
)
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