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
d26bdd91
Commit
d26bdd91
authored
May 23, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
May 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Framework for determing glyph properties after shaping.
parent
7c8ce6c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
29 deletions
+41
-29
shape.c
dlls/usp10/shape.c
+38
-28
usp10.c
dlls/usp10/usp10.c
+1
-0
usp10_internal.h
dlls/usp10/usp10_internal.h
+1
-0
usp10.h
include/usp10.h
+1
-1
No files found.
dlls/usp10/shape.c
View file @
d26bdd91
...
...
@@ -44,6 +44,9 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
static
void
ContextualShape_Syriac
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
static
void
ContextualShape_Phags_pa
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
typedef
VOID
(
*
ShapeCharGlyphPropProc
)(
HDC
,
ScriptCache
*
,
SCRIPT_ANALYSIS
*
,
const
WCHAR
*
,
const
INT
,
const
WORD
*
,
const
INT
,
WORD
*
,
SCRIPT_CHARPROP
*
,
SCRIPT_GLYPHPROP
*
);
extern
const
unsigned
short
wine_shaping_table
[];
extern
const
unsigned
short
wine_shaping_forms
[
LAST_ARABIC_CHAR
-
FIRST_ARABIC_CHAR
+
1
][
4
];
...
...
@@ -332,39 +335,40 @@ static const char* required_lao_features[] =
};
typedef
struct
ScriptShapeDataTag
{
TEXTRANGE_PROPERTIES
defaultTextRange
;
const
char
**
requiredFeatures
;
CHAR
otTag
[
5
];
ContextualShapingProc
contextProc
;
TEXTRANGE_PROPERTIES
defaultTextRange
;
const
char
**
requiredFeatures
;
CHAR
otTag
[
5
];
ContextualShapingProc
contextProc
;
ShapeCharGlyphPropProc
charGlyphPropProc
;
}
ScriptShapeData
;
/* in order of scripts */
static
const
ScriptShapeData
ShapingData
[]
=
{
{{
standard_features
,
2
},
NULL
,
""
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
""
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
},
{{
hebrew_features
,
1
},
NULL
,
"hebr"
,
NULL
},
{{
syriac_features
,
4
},
required_syriac_features
,
"syrc"
,
ContextualShape_Syriac
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
},
{{
NULL
,
0
},
NULL
,
"thaa"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"grek"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"cyrl"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"armn"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"geor"
,
NULL
},
{{
sinhala_features
,
7
},
NULL
,
"sinh"
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"phag"
,
ContextualShape_Phags_pa
},
{{
thai_features
,
1
},
NULL
,
"thai"
,
NULL
},
{{
thai_features
,
1
},
NULL
,
"thai"
,
NULL
},
{{
thai_features
,
1
},
required_lao_features
,
"lao"
,
NULL
},
{{
thai_features
,
1
},
required_lao_features
,
"lao"
,
NULL
},
{{
standard_features
,
2
},
NULL
,
""
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
""
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"latn"
,
NULL
,
NULL
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
,
NULL
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
,
NULL
},
{{
hebrew_features
,
1
},
NULL
,
"hebr"
,
NULL
,
NULL
},
{{
syriac_features
,
4
},
required_syriac_features
,
"syrc"
,
ContextualShape_Syriac
,
NULL
},
{{
arabic_features
,
6
},
required_arabic_features
,
"arab"
,
ContextualShape_Arabic
,
NULL
},
{{
NULL
,
0
},
NULL
,
"thaa"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"grek"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"cyrl"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"armn"
,
NULL
,
NULL
},
{{
standard_features
,
2
},
NULL
,
"geor"
,
NULL
,
NULL
},
{{
sinhala_features
,
7
},
NULL
,
"sinh"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"tibt"
,
NULL
,
NULL
},
{{
tibetan_features
,
2
},
NULL
,
"phag"
,
ContextualShape_Phags_pa
,
NULL
},
{{
thai_features
,
1
},
NULL
,
"thai"
,
NULL
,
NULL
},
{{
thai_features
,
1
},
NULL
,
"thai"
,
NULL
,
NULL
},
{{
thai_features
,
1
},
required_lao_features
,
"lao"
,
NULL
,
NULL
},
{{
thai_features
,
1
},
required_lao_features
,
"lao"
,
NULL
,
NULL
},
};
static
INT
GSUB_is_glyph_covered
(
LPCVOID
table
,
UINT
glyph
)
...
...
@@ -1313,6 +1317,12 @@ static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS
HeapFree
(
GetProcessHeap
(),
0
,
context_shape
);
}
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
)
{
if
(
ShapingData
[
psa
->
eScript
].
charGlyphPropProc
)
ShapingData
[
psa
->
eScript
].
charGlyphPropProc
(
hdc
,
psc
,
psa
,
pwcChars
,
cChars
,
pwGlyphs
,
cGlyphs
,
pwLogClust
,
pCharProp
,
pGlyphProp
);
}
void
SHAPE_ContextualShaping
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
)
{
if
(
ShapingData
[
psa
->
eScript
].
contextProc
)
...
...
dlls/usp10/usp10.c
View file @
d26bdd91
...
...
@@ -1589,6 +1589,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
{
SHAPE_ContextualShaping
(
hdc
,
(
ScriptCache
*
)
*
psc
,
psa
,
rChars
,
cChars
,
pwOutGlyphs
,
pcGlyphs
,
cMaxGlyphs
,
pwLogClust
);
SHAPE_ApplyDefaultOpentypeFeatures
(
hdc
,
(
ScriptCache
*
)
*
psc
,
psa
,
pwOutGlyphs
,
pcGlyphs
,
cMaxGlyphs
,
cChars
,
pwLogClust
);
SHAPE_CharGlyphProp
(
hdc
,
(
ScriptCache
*
)
*
psc
,
psa
,
pwcChars
,
cChars
,
pwOutGlyphs
,
*
pcGlyphs
,
pwLogClust
,
pCharProps
,
pOutGlyphProps
);
}
heap_free
(
rChars
);
}
...
...
dlls/usp10/usp10_internal.h
View file @
d26bdd91
...
...
@@ -85,3 +85,4 @@ INT BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B
void
SHAPE_ContextualShaping
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WCHAR
*
pwcChars
,
INT
cChars
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
WORD
*
pwLogClust
);
void
SHAPE_ApplyDefaultOpentypeFeatures
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
,
WORD
*
pwOutGlyphs
,
INT
*
pcGlyphs
,
INT
cMaxGlyphs
,
INT
cChars
,
WORD
*
pwLogClust
);
HRESULT
SHAPE_CheckFontForRequiredFeatures
(
HDC
hdc
,
ScriptCache
*
psc
,
SCRIPT_ANALYSIS
*
psa
);
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
);
include/usp10.h
View file @
d26bdd91
...
...
@@ -86,7 +86,7 @@ typedef enum tag_SCRIPT_JUSTIFY {
SCRIPT_JUSTIFY_ARABIC_BA
=
12
,
SCRIPT_JUSTIFY_ARABIC_BARA
=
13
,
SCRIPT_JUSTIFY_ARABIC_SEEN
=
14
,
SCRIPT_JUSTIFY_
RESERVED4
=
15
,
SCRIPT_JUSTIFY_
ARABIC_SEEN_M
=
15
,
}
SCRIPT_JUSTIFY
;
typedef
struct
tag_SCRIPT_CONTROL
{
...
...
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