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
9a6b0750
Commit
9a6b0750
authored
Aug 31, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Recognize semi light weight patterns.
parent
c0ab20ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
font.c
dlls/dwrite/font.c
+10
-0
dwrite.idl
include/dwrite.idl
+1
-0
No files found.
dlls/dwrite/font.c
View file @
9a6b0750
...
...
@@ -2236,6 +2236,11 @@ static DWRITE_FONT_WEIGHT font_extract_weight(struct list *tokens, DWRITE_FONT_W
{
NULL
}
};
static
const
struct
name_pattern
semilight_patterns
[]
=
{
{
semiW
,
lightW
},
{
NULL
}
};
static
const
struct
name_pattern
demibold_patterns
[]
=
{
{
semiW
,
boldW
},
{
demiW
,
boldW
},
...
...
@@ -2302,6 +2307,9 @@ static DWRITE_FONT_WEIGHT font_extract_weight(struct list *tokens, DWRITE_FONT_W
if
(
match_pattern_list
(
tokens
,
extralight_patterns
,
match
))
return
DWRITE_FONT_WEIGHT_EXTRA_LIGHT
;
if
(
match_pattern_list
(
tokens
,
semilight_patterns
,
match
))
return
DWRITE_FONT_WEIGHT_SEMI_LIGHT
;
if
(
match_pattern_list
(
tokens
,
demibold_patterns
,
match
))
return
DWRITE_FONT_WEIGHT_DEMI_BOLD
;
...
...
@@ -2362,6 +2370,7 @@ static int compare_knownweights(const void *a, const void* b)
static
BOOL
is_known_weight_value
(
DWRITE_FONT_WEIGHT
weight
,
WCHAR
*
nameW
)
{
static
const
WCHAR
extralightW
[]
=
{
'E'
,
'x'
,
't'
,
'r'
,
'a'
,
' '
,
'L'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
semilightW
[]
=
{
'S'
,
'e'
,
'm'
,
'i'
,
' '
,
'L'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
extrablackW
[]
=
{
'E'
,
'x'
,
't'
,
'r'
,
'a'
,
' '
,
'B'
,
'l'
,
'a'
,
'c'
,
'k'
,
0
};
static
const
WCHAR
extraboldW
[]
=
{
'E'
,
'x'
,
't'
,
'r'
,
'a'
,
' '
,
'B'
,
'o'
,
'l'
,
'd'
,
0
};
static
const
WCHAR
demiboldW
[]
=
{
'D'
,
'e'
,
'm'
,
'i'
,
' '
,
'B'
,
'o'
,
'l'
,
'd'
,
0
};
...
...
@@ -2371,6 +2380,7 @@ static BOOL is_known_weight_value(DWRITE_FONT_WEIGHT weight, WCHAR *nameW)
{
thinW
,
DWRITE_FONT_WEIGHT_THIN
},
{
extralightW
,
DWRITE_FONT_WEIGHT_EXTRA_LIGHT
},
{
lightW
,
DWRITE_FONT_WEIGHT_LIGHT
},
{
semilightW
,
DWRITE_FONT_WEIGHT_SEMI_LIGHT
},
{
mediumW
,
DWRITE_FONT_WEIGHT_MEDIUM
},
{
demiboldW
,
DWRITE_FONT_WEIGHT_DEMI_BOLD
},
{
boldW
,
DWRITE_FONT_WEIGHT_BOLD
},
...
...
include/dwrite.idl
View file @
9a6b0750
...
...
@@ -73,6 +73,7 @@ typedef enum DWRITE_FONT_WEIGHT
DWRITE_FONT_WEIGHT_EXTRA_LIGHT
=
200
,
DWRITE_FONT_WEIGHT_ULTRA_LIGHT
=
200
,
DWRITE_FONT_WEIGHT_LIGHT
=
300
,
DWRITE_FONT_WEIGHT_SEMI_LIGHT
=
350
,
DWRITE_FONT_WEIGHT_NORMAL
=
400
,
DWRITE_FONT_WEIGHT_REGULAR
=
400
,
DWRITE_FONT_WEIGHT_MEDIUM
=
500
,
...
...
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