Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
36456e64
Commit
36456e64
authored
24 years ago
by
Hidenori Takeshima
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added support for cp949.
parent
5bdf9b4c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
graphics/x11drv/codepage.c
+36
-46
36 additions, 46 deletions
graphics/x11drv/codepage.c
with
36 additions
and
46 deletions
graphics/x11drv/codepage.c
+
36
−
46
View file @
36456e64
...
@@ -333,26 +333,22 @@ void X11DRV_DrawString_dbcs( fontObject* pfo, Display* pdisp,
...
@@ -333,26 +333,22 @@ void X11DRV_DrawString_dbcs( fontObject* pfo, Display* pdisp,
}
}
static
static
int
X11DRV_TextWidth_
cp932
(
fontObject
*
pfo
,
XChar2b
*
pstr
,
int
count
)
int
X11DRV_TextWidth_
dbcs_2fonts
(
fontObject
*
pfo
,
XChar2b
*
pstr
,
int
count
)
{
{
int
i
;
int
i
;
int
width
;
int
width
;
fontObject
*
pfo_ansi
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
int
curfont
;
fontObject
*
pfos
[
X11FONT_REFOBJS_MAX
+
1
];
pfos
[
0
]
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
pfos
[
1
]
=
pfo
;
if
(
pfos
[
0
]
==
NULL
)
pfos
[
0
]
=
pfo
;
width
=
0
;
width
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
{
if
(
pstr
->
byte1
!=
(
BYTE
)
0
)
curfont
=
(
pstr
->
byte1
!=
0
)
?
1
:
0
;
{
width
+=
TSXTextWidth16
(
pfos
[
curfont
]
->
fs
,
pstr
,
1
);
width
+=
TSXTextWidth16
(
pfo
->
fs
,
pstr
,
1
);
}
else
{
if
(
pfo_ansi
!=
NULL
)
{
width
+=
TSXTextWidth16
(
pfo_ansi
->
fs
,
pstr
,
1
);
}
}
pstr
++
;
pstr
++
;
}
}
...
@@ -360,9 +356,9 @@ int X11DRV_TextWidth_cp932( fontObject* pfo, XChar2b* pstr, int count )
...
@@ -360,9 +356,9 @@ int X11DRV_TextWidth_cp932( fontObject* pfo, XChar2b* pstr, int count )
}
}
static
static
void
X11DRV_DrawText_
cp932
(
fontObject
*
pfo
,
Display
*
pdisp
,
Drawable
d
,
void
X11DRV_DrawText_
dbcs_2fonts
(
fontObject
*
pfo
,
Display
*
pdisp
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
XTextItem16
*
pitems
,
GC
gc
,
int
x
,
int
y
,
XTextItem16
*
pitems
,
int
count
)
int
count
)
{
{
int
i
,
nitems
,
prevfont
=
-
1
,
curfont
;
int
i
,
nitems
,
prevfont
=
-
1
,
curfont
;
XChar2b
*
pstr
;
XChar2b
*
pstr
;
...
@@ -372,6 +368,7 @@ void X11DRV_DrawText_cp932( fontObject* pfo, Display* pdisp, Drawable d,
...
@@ -372,6 +368,7 @@ void X11DRV_DrawText_cp932( fontObject* pfo, Display* pdisp, Drawable d,
pfos
[
0
]
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
pfos
[
0
]
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
pfos
[
1
]
=
pfo
;
pfos
[
1
]
=
pfo
;
if
(
pfos
[
0
]
==
NULL
)
pfos
[
0
]
=
pfo
;
nitems
=
0
;
nitems
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
...
@@ -410,39 +407,32 @@ void X11DRV_DrawText_cp932( fontObject* pfo, Display* pdisp, Drawable d,
...
@@ -410,39 +407,32 @@ void X11DRV_DrawText_cp932( fontObject* pfo, Display* pdisp, Drawable d,
}
}
static
static
void
X11DRV_TextExtents_
cp932
(
fontObject
*
pfo
,
XChar2b
*
pstr
,
int
count
,
void
X11DRV_TextExtents_
dbcs_2fonts
(
fontObject
*
pfo
,
XChar2b
*
pstr
,
int
count
,
int
*
pdir
,
int
*
pascent
,
int
*
pdescent
,
int
*
pdir
,
int
*
pascent
,
int
*
pdescent
,
int
*
pwidth
)
int
*
pwidth
)
{
{
XCharStruct
info
;
XCharStruct
info
;
int
ascent
,
descent
,
width
;
int
ascent
,
descent
,
width
;
int
i
;
int
i
;
fontObject
*
pfo_ansi
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
int
curfont
;
fontObject
*
pfos
[
X11FONT_REFOBJS_MAX
+
1
];
pfos
[
0
]
=
XFONT_GetFontObject
(
pfo
->
prefobjs
[
0
]
);
pfos
[
1
]
=
pfo
;
if
(
pfos
[
0
]
==
NULL
)
pfos
[
0
]
=
pfo
;
width
=
0
;
width
=
0
;
*
pascent
=
0
;
*
pascent
=
0
;
*
pdescent
=
0
;
*
pdescent
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
{
if
(
pstr
->
byte1
!=
(
BYTE
)
0
)
curfont
=
(
pstr
->
byte1
!=
0
)
?
1
:
0
;
{
TSXTextExtents16
(
pfos
[
curfont
]
->
fs
,
pstr
,
1
,
pdir
,
TSXTextExtents16
(
pfo
->
fs
,
pstr
,
1
,
pdir
,
&
ascent
,
&
descent
,
&
info
);
&
ascent
,
&
descent
,
&
info
);
if
(
*
pascent
<
ascent
)
*
pascent
=
ascent
;
if
(
*
pascent
<
ascent
)
*
pascent
=
ascent
;
if
(
*
pdescent
<
descent
)
*
pdescent
=
descent
;
if
(
*
pdescent
<
descent
)
*
pdescent
=
descent
;
width
+=
info
.
width
;
width
+=
info
.
width
;
}
else
{
if
(
pfo_ansi
!=
NULL
)
{
TSXTextExtents16
(
pfo_ansi
->
fs
,
pstr
,
1
,
pdir
,
&
ascent
,
&
descent
,
&
info
);
if
(
*
pascent
<
ascent
)
*
pascent
=
ascent
;
if
(
*
pdescent
<
descent
)
*
pdescent
=
descent
;
width
+=
info
.
width
;
}
}
pstr
++
;
pstr
++
;
}
}
...
@@ -544,9 +534,9 @@ const X11DRV_CP X11DRV_cptable[X11DRV_CPTABLE_COUNT] =
...
@@ -544,9 +534,9 @@ const X11DRV_CP X11DRV_cptable[X11DRV_CPTABLE_COUNT] =
X11DRV_enum_subfont_charset_cp932
,
X11DRV_enum_subfont_charset_cp932
,
X11DRV_unicode_to_char2b_cp932
,
X11DRV_unicode_to_char2b_cp932
,
X11DRV_DrawString_dbcs
,
X11DRV_DrawString_dbcs
,
X11DRV_TextWidth_
cp932
,
X11DRV_TextWidth_
dbcs_2fonts
,
X11DRV_DrawText_
cp932
,
X11DRV_DrawText_
dbcs_2fonts
,
X11DRV_TextExtents_
cp932
,
X11DRV_TextExtents_
dbcs_2fonts
,
X11DRV_GetTextMetricsA_cp932
,
X11DRV_GetTextMetricsA_cp932
,
},
},
{
/* CP936 */
{
/* CP936 */
...
@@ -561,10 +551,10 @@ const X11DRV_CP X11DRV_cptable[X11DRV_CPTABLE_COUNT] =
...
@@ -561,10 +551,10 @@ const X11DRV_CP X11DRV_cptable[X11DRV_CPTABLE_COUNT] =
{
/* CP949 */
{
/* CP949 */
X11DRV_enum_subfont_charset_cp949
,
X11DRV_enum_subfont_charset_cp949
,
X11DRV_unicode_to_char2b_cp949
,
X11DRV_unicode_to_char2b_cp949
,
X11DRV_DrawString_
normal
,
/* FIXME */
X11DRV_DrawString_
dbcs
,
X11DRV_TextWidth_
normal
,
/* FIXME */
X11DRV_TextWidth_
dbcs_2fonts
,
X11DRV_DrawText_
normal
,
/* FIXME */
X11DRV_DrawText_
dbcs_2fonts
,
X11DRV_TextExtents_
normal
,
/* FIXME */
X11DRV_TextExtents_
dbcs_2fonts
,
X11DRV_GetTextMetricsA_normal
,
/* FIXME */
X11DRV_GetTextMetricsA_normal
,
/* FIXME */
},
},
{
/* CP950 */
{
/* CP950 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment