Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bd0af90d
Commit
bd0af90d
authored
Apr 16, 2009
by
Kenichi Handa
Browse files
(xfont_has_char): Special handling of `ja' and `ko' adstyle.
parent
b840b299
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
7 deletions
+55
-7
src/ChangeLog
src/ChangeLog
+32
-0
src/xfont.c
src/xfont.c
+23
-7
No files found.
src/ChangeLog
View file @
bd0af90d
2009-04-16 Kenichi Handa <handa@m17n.org>
* xfont.c (xfont_has_char): Special handling of `ja' and `ko'
adstyle.
* xftfont.c (xftfont_has_char): Special handling of `ja' and `ko'
adstyle.
* ftfont.c (Qja, Qko): Don't make them static.
(enum ftfont_cache_for): New enum.
(fc_charset_table): Undo the previous change.
(ftfont_get_latin1_charset): Delete it.
(ftfont_pattern_entity): Check cache by ftfont_lookup_cache. Set
FONT_SIZE_INDEX of the entity to 0 for a scalable font. For a
non-scarable font, try to get AVERAGE_WIDTH.
(ftfont_lookup_cache): Argument FOR-FACE is changed to CACHE_FOR.
Change ft_face_cache from a list of a hash-table. Don't check
`ja' and `ko' adstyle here.
(ftfont_get_fc_charset): Call ftfont_lookup_cache with
FTFONT_CACHE_FOR_CHARET.
(ftfont_get_charset): Undo the previous change.
(ftfont_open): Call ftfont_lookup_cache with
FTFONT_CACHE_FOR_FACE.
(ftfont_close): Likewise.
(ftfont_has_char): Special handling of `ja' and `ko' adstyle.
* font.c (font_sort_entites): Change the meaning of the arg
BEST-ONLY. Don't optimize for VEC of lenght 1.
(font_select_entity): Just return the value of font_sort_entites.
* xfaces.c (merge_face_vectors): Reflect font properties in
to[LFACE_FONT_INDEX] to the other face attributes. Don't call
font_clear_prop if a face attribute doesn't change.
* charset.h (charset_ksc5601): Extern it.
* charset.c (charset_ksc5601): New variable.
...
...
src/xfont.c
View file @
bd0af90d
...
...
@@ -792,17 +792,33 @@ xfont_prepare_face (f, face)
return
0
;
}
extern
Lisp_Object
Qja
,
Qko
;
static
int
xfont_has_char
(
entity
,
c
)
Lisp_Object
entity
;
xfont_has_char
(
font
,
c
)
Lisp_Object
font
;
int
c
;
{
Lisp_Object
registry
=
AREF
(
entity
,
FONT_REGISTRY_INDEX
);
Lisp_Object
registry
=
AREF
(
font
,
FONT_REGISTRY_INDEX
);
struct
charset
*
encoding
;
struct
charset
*
repertory
;
if
(
font_registry_charsets
(
registry
,
&
encoding
,
&
repertory
)
<
0
)
return
-
1
;
struct
charset
*
repertory
=
NULL
;
if
(
EQ
(
registry
,
Qiso10646_1
))
{
/* We use a font of `ja' and `ko' adstyle only for a character
in JISX0208 and KSC5601 charsets respectively. */
if
(
EQ
(
AREF
(
font
,
FONT_ADSTYLE_INDEX
),
Qja
)
&&
charset_jisx0208
>=
0
)
encoding
=
repertory
=
CHARSET_FROM_ID
(
charset_jisx0208
);
else
if
(
EQ
(
AREF
(
font
,
FONT_ADSTYLE_INDEX
),
Qko
)
&&
charset_ksc5601
>=
0
)
encoding
=
repertory
=
CHARSET_FROM_ID
(
charset_ksc5601
);
else
encoding
=
CHARSET_FROM_ID
(
charset_unicode
);
}
else
if
(
font_registry_charsets
(
registry
,
&
encoding
,
&
repertory
)
<
0
)
/* Unknown REGISTRY, not usable. */
return
0
;
if
(
ASCII_CHAR_P
(
c
)
&&
encoding
->
ascii_compatible_p
)
return
1
;
if
(
!
repertory
)
...
...
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