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
1fed1473
Commit
1fed1473
authored
Jun 22, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Update Indic framework to handle non-modern fonts.
parent
39ace9e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
11 deletions
+41
-11
indic.c
dlls/usp10/indic.c
+40
-10
shape.c
dlls/usp10/shape.c
+0
-0
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-1
No files found.
dlls/usp10/indic.c
View file @
1fed1473
...
...
@@ -207,24 +207,54 @@ 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
)
static
BOOL
Consonent_is_post_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
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
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"pstf"
)
>
0
);
{
if
(
modern
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"pstf"
)
>
0
);
else
{
WCHAR
cc
[
2
];
cc
[
0
]
=
pwChar
[
s
->
base
];
cc
[
1
]
=
pwChar
[
s
->
base
-
1
];
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
cc
,
1
,
2
,
"pstf"
)
>
0
);
}
}
return
FALSE
;
}
static
BOOL
Consonent_is_below_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
static
BOOL
Consonent_is_below_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
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
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"blwf"
)
>
0
);
{
if
(
modern
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"blwf"
)
>
0
);
else
{
WCHAR
cc
[
2
];
cc
[
0
]
=
pwChar
[
s
->
base
];
cc
[
1
]
=
pwChar
[
s
->
base
-
1
];
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
cc
,
1
,
2
,
"blwf"
)
>
0
);
}
}
return
FALSE
;
}
static
BOOL
Consonent_is_pre_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
pwChar
,
IndicSyllable
*
s
,
lexical_function
lexical
)
static
BOOL
Consonent_is_pre_base_form
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
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
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"pref"
)
>
0
);
{
if
(
modern
)
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
&
pwChar
[
s
->
base
-
1
],
1
,
2
,
"pref"
)
>
0
);
else
{
WCHAR
cc
[
2
];
cc
[
0
]
=
pwChar
[
s
->
base
];
cc
[
1
]
=
pwChar
[
s
->
base
-
1
];
return
(
SHAPE_does_GSUB_feature_apply_to_chars
(
hdc
,
psa
,
psc
,
cc
,
1
,
2
,
"pref"
)
>
0
);
}
}
return
FALSE
;
}
...
...
@@ -235,7 +265,7 @@ static BOOL Consonent_is_ralf(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
return
FALSE
;
}
static
int
FindBaseConsonant
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
)
static
int
FindBaseConsonant
(
HDC
hdc
,
SCRIPT_ANALYSIS
*
psa
,
ScriptCache
*
psc
,
LPWSTR
input
,
IndicSyllable
*
s
,
lexical_function
lex
,
BOOL
modern
)
{
int
i
;
BOOL
blwf
=
FALSE
;
...
...
@@ -259,7 +289,7 @@ 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
)
||
(
pref
=
Consonent_is_pre_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
)))
while
((
blwf
=
Consonent_is_below_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
,
modern
))
||
Consonent_is_post_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
,
modern
)
||
(
pref
=
Consonent_is_pre_base_form
(
hdc
,
psa
,
psc
,
input
,
s
,
lex
,
modern
)))
{
if
(
blwf
&&
s
->
blwf
==
-
1
)
s
->
blwf
=
s
->
base
-
1
;
...
...
@@ -283,7 +313,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
)
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
index
=
0
;
int
next
=
0
;
...
...
@@ -316,7 +346,7 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L
(
*
syllables
)[
*
syllable_count
].
blwf
=
-
1
;
(
*
syllables
)[
*
syllable_count
].
pref
=
-
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
,
modern
);
reorder_f
(
input
,
&
(
*
syllables
)[
*
syllable_count
],
lex
);
index
=
next
;
*
syllable_count
=
(
*
syllable_count
)
+
1
;
...
...
dlls/usp10/shape.c
View file @
1fed1473
This diff is collapsed.
Click to expand it.
dlls/usp10/usp10_internal.h
View file @
1fed1473
...
...
@@ -129,4 +129,4 @@ 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
;
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
)
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
;
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