1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-30 02:33:03 -07:00
Commit graph

88 commits

Author SHA1 Message Date
Kenichi Handa
69eb9e8b47 (Ffont_put): Don't use font_parse_family_registry for
family name.
2008-06-05 05:39:37 +00:00
Kenichi Handa
2ecee2d034 (Ffont_spec): Don't use font_parse_family_registry for
family name.
2008-06-05 05:08:57 +00:00
Andreas Schwab
0615d9037b (font_prop_validate_spacing): Fix last change. 2008-06-03 20:37:41 +00:00
Kenichi Handa
e6cb3cf55f (font_parse_fcname): Fix handling of unknown key. 2008-06-03 11:50:33 +00:00
Kenichi Handa
3692570fcd (font_prop_validate_spacing): Handle uppercase symbols. 2008-06-03 05:57:56 +00:00
Chong Yidong
17e28f6d73 (font_pixel_size): Don't take cdr of an integer. 2008-06-02 16:40:59 +00:00
Kenichi Handa
1d1e124535 (font_find_for_lface): Handle float font size.
(font_open_for_lface): Likewise.
2008-06-02 04:07:43 +00:00
Kenichi Handa
e4c93315ec (font_list_entities): Fix the car part of data to be
stored in the cache.
2008-05-31 09:58:27 +00:00
Kenichi Handa
a266686a02 (Ffont_info): Define only if HAVE_WINDOW_SYSTEM is
defined.
(syms_of_font): Defsubr Sfont_info only if HAVE_WINDOW_SYSTEM is
defined.
2008-05-30 13:21:57 +00:00
Kenichi Handa
72606e4580 (font_style_to_value, font_score): Delete casting of the
args to xstcasecmp.
(register_font_driver): Increment num_font_drivers only when
registering the driver globally.
(Ffont_info): Moved from fontset.c.  Handle a font object too.
(syms_of_font): Defsubr Sfont_info.
2008-05-30 02:34:46 +00:00
Kenichi Handa
aa50ca2fb3 (font_parse_family_registry): Use Ffont_put to validate
foundry and family.
(font_delete_unmatched): Don't check spacing.
(font_list_entities): Add spacing to the spec to list fonts.
2008-05-28 11:47:01 +00:00
Kenichi Handa
6a3dadd2c2 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE)
(check_gstring, check_otf_features, otf_list, otf_tag_symbol)
(otf_open, font_otf_capability, generate_otf_features)
(font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
Commented out by surrounding "#if 0" and "#endif" for the moment.
(Ffont_drive_otf, Ffont_otf_alternates): Likewise.
(syms_of_font): Codes for accessing above commented out.
2008-05-25 11:00:52 +00:00
Jason Rumney
577eba225c Don't include strings.h. 2008-05-22 22:12:25 +00:00
Jason Rumney
0513110744 * dispextern.h, xfaces.c (xstrcasecmp): Renamed from xstricmp.
* dosfns.c, fileio.c, font.c, fontset.c, image.c, macfns.c:
* macterm.c, process.c, w32.c, w32fns.c, w32proc.c, xfaces.c:
* xfns.c, xfont.c: Callers changed.
2008-05-22 14:54:27 +00:00
Jason Rumney
5d3f7fd872 (font_style_to_value, font_score): Use xstricmp. 2008-05-22 13:36:30 +00:00
Kenichi Handa
64b900e33e (font_prop_validate_style): Adjusted for the format
change of font_style_table.
2008-05-22 05:21:06 +00:00
Kenichi Handa
68eaeee492 *** empty log message *** 2008-05-22 02:21:05 +00:00
Kenichi Handa
d0ab1ebe49 Checking of FONT_DEBUG is moved to font.h. All calls of
xassert are changed to font_assert.  Many unused variables
deleted.
(Vfont_weight_table, Vfont_slant_table, Vfont_width_table): New
variables.
(struct table_entry): Moved from xfaces.c and modified.
(weight_table, slant_table, width_table): Moved from xfaces.c and
contents adjusted for the change of struct table_entry.
(font_style_to_value, font_style_symbolic): Adjuted for the format
change of font_style_table.
(font_parse_family_registry): Don't overwrite existing foundry and
family of font_spec.
(font_score): Fix calculation of diff for sizes.
(font_sort_entites): Call font_add_log.
(font_delete_unmatched): Return a newly created list.
(font_list_entities): Fix previous change.  Call font_add_log.
(font_matching_entity, font_open_entity, font_close_entity): Call
font_add_log.
(Ffont_xlfd_name): New arg FOLD-WILDCARDS.
(Finternal_set_font_style_table): Deleted.
(BUILD_STYLE_TABLE): New macro.
(build_style_table): New function.
(Vfont_log, font_log_env_checked): New variables.
(font_add_log): New function.
(syms_of_font): Delete defsubr Sinternal_set_font_style_table.
Declare Lisp variables "font-weight-table", "font-slant-table",
"font-width-table", and "font-log".  Initialize font_style_table.
2008-05-22 02:19:21 +00:00
Juanma Barranquero
027a33c045 (syms-of-font) <font-encoding-alist>:
(Ffontp, Ffont_make_gstring): Fix typos in docstrings.
(Flist_fonts, Ffont_family_list, Ffont_fill_gstring, Fquery_font,
Ffont_otf_alternates): Doc fixes.
2008-05-20 16:00:55 +00:00
Kenichi Handa
819e81df02 (Vfont_encoding_alist, find_font_encoding): Moved from
fontset.c.
(font_pixel_size)[! HAVE_WINDOW_SYSTEM]: Return 1.
(font_open_entity): Update FRAME_X_DISPLAY_INFO (f)->n_fonts,
FRAME_SMALLEST_CHAR_WIDTH (f), and FRAME_SMALLEST_FONT_HEIGHT (f)
only when HAVE_WINDOW_SYSTEM is defined.
(font_close_object): Update FRAME_X_DISPLAY_INFO (f)->n_fonts only
when HAVE_WINDOW_SYSTEM is defined.
2008-05-20 06:33:10 +00:00
Kenichi Handa
7cee5d639b (font_list_entities): Fix handling of cache.
(font_matching_entity): Likewise.
2008-05-19 07:22:45 +00:00
Kenichi Handa
79f105c988 (font_find_for_lface): Reflect LFACE_FONT in the font
preference.
2008-05-15 10:29:39 +00:00
Kenichi Handa
be9442ad03 (font_clear_cache): Check if the cached vector of entities is nil
or not.
2008-05-14 12:28:17 +00:00
Kenichi Handa
1f09f444ca (font_prop_validate): Make nil a valid value. 2008-05-14 10:38:43 +00:00
Glenn Morris
9ec0b715e2 Switch to recommended form of GPLv3 permissions notice. 2008-05-14 07:50:26 +00:00
Kenichi Handa
35027d0ca6 Include <strings.h>.
(enable_font_backend): Delete it.
(Qfont_spec, Qfont_entity, Qfont_object): New variables.
(CHECK_VALIDATE_FONT_SPEC): Delete it.
(PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h.
(null_string): Delete it.
(null_vector): Make it static.
(font_family_alist): Delete it.
(Qnormal): Extern it.
(QCextra, QClanguage): Delete it.
(QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New
variables.
(font_make_spec, font_make_entity, font_make_object)
(font_intern_prop): Renamed from intern_downcase.  Don't downcase
the string.  Callers changed.
(font_pixel_size): Adjusted for the format change of font-related
objects.
(prop_name_to_numeric, prop_numeric_to_name): Delete them.
(font_style_to_value, font_style_symbolic): New function.
(build_font_family_alist): Delete it.
(font_registry_charsets): Use Fassoc_string instead of
assq_no_quit.
(font_prop_validate_symbol): Don't return null_string.
(font_prop_validate_style): Adjusted for the change of
style-related values in a font vector.
(font_property_table): Delete entries for QClangauge and
QCantialias, add entries for QCavgwidth.
(get_font_prop_index): Delete the 2nd argument FROM.
(font_prop_validate): Arguments changed.
(font_put_extra): Adjusted for the change of font-related objects.
(font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd)
(font_parse_fcname, font_unparse_fcname)
(font_prepare_composition): Likewise.
(font_parse_family_registry): Renamed from font_merge_old_spec.
(otf_open): Delete the 1st arg entity.
(font_otf_capability): Adjusted for the above change.
(font_score): New arg alternate_families.  Adjusted for the change
of font-related objects.
(font_sort_entites): New arg best_only.
(font_symbolic_weight, font_symbolic_slant, font_symbolic_width):
Delete them.
(font_match_p): Check alternate families.
(font_find_object): Delete it.
(font_check_object): New function.
(font_clear_cache): Adjusted for the change of font-related
objects.
(font_delete_unmatched): New arg.
(font_list_entities): Call font_driver->list with a spec that
doesn't specify style-related properties.
(font_matching_entity): Arguments changed.  Caller changed.
(font_open_entity): Adjusted for the change of font-related
objects.
(font_close_object, font_has_char, font_encode_char)
(font_get_name, font_get_spec): Likewise.
(font_spec_from_name, font_clear_prop, font_update_lface): New
functions.
(font_find_for_lface, font_open_for_lface, font_load_for_lface):
(font_prepare_for_face, font_done_for_face, font_open_by_name)
(font_at): Adjusted for the change of font-related objects.
(font_range): New function.
(Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts)
(Ffont_xlfd_name): Adjusted for the change of font-related
objects.
(Fcopy_font_spec, Fmerge_font_spec): New function.
(Ffont_family_list): Renamed from list-families.
(Finternal_set_font_style_table): Arguments changed.
(Ffont_fill_gstring, Ffont_shape_text, Fopen_font)
(Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjusted for the
change of font-related objects.
(syms_of_font): Delete "ifdef USE_FONT_BACKEND".  DEFSYM new
symboles.
2008-05-14 01:25:55 +00:00
Juanma Barranquero
67b5d7deb1 (Ffont_match_p): Don't use `iff' in docstring. 2008-05-08 04:07:39 +00:00
Kenichi Handa
382abc20c4 (font_prop_validate): Signal error' instead of font'. 2008-04-27 09:06:42 +00:00
Jason Rumney
f3b9e4791f (font_unparse_fcname): Increase len when style is a symbol. 2008-03-01 20:21:03 +00:00
Stefan Monnier
0f8b27ea24 * dispextern.h (face_at_buffer_position, face_for_overlay_string)
(face_at_string_position):
* xfaces.c (face_at_buffer_position, face_for_overlay_string)
(face_at_string_position):
* xdisp.c (display_string, next_overlay_change):
* buffer.h (overlays_at):
* buffer.c (overlays_at): Use EMACS_INT for buffer positions.
Update callers.
2008-02-26 18:18:05 +00:00
Juanma Barranquero
51c0110044 (Ffont_spec, Ffont_at): Fix typos in docstrings.
(Ffont_put, Flist_families, Ffont_fill_gstring, Ffont_drive_otf,
Ffont_otf_alternates, Fquery_font): Doc fixes.
2008-02-26 16:25:25 +00:00
Kenichi Handa
b876ea9155 If the font driver doesn't have `shape' function, return Qnil. 2008-02-25 01:43:02 +00:00
Stefan Monnier
43a1d19b39 (font_match_xlfd, font_check_xlfd_parse): New funs.
(font_parse_xlfd): Use them for sanity check.
(Finternal_set_font_style_table): Make sure the table is bijiective.
2008-02-22 19:04:03 +00:00
Stefan Monnier
81aefea466 (font_unparse_xlfd): Don't ignore integer pixel size specs. 2008-02-18 18:38:49 +00:00
Kenichi Handa
43c0454d44 Include xterm.h.
[HAVE_NTGUI]: Include w32term.h.
[MAC_OS]: Include macterm.ch.
(font_otf_ValueRecord): Use make_number.
(font_finish_cache): Fix handling of reference count.
(font_clear_cache): Update num_fonts.
(font_open_entity): Update smallest_char_width and
smallest_font_height of the frame.
(font_close_object): Update num_fonts.
(Fclear_font_cache): Fix finding the target cache data.
2008-02-17 02:05:08 +00:00
Eli Zaretskii
2930d11791 (Ffont_fill_gstring, Fget_font_glyphs): Fix compilation warnings. 2008-02-16 14:51:05 +00:00
Glenn Morris
7ecf3dcbe0 Update copyright years. 2008-02-06 04:21:49 +00:00
Stefan Monnier
f9ffa1eabb (check_gstring): Use them and AREF to access the vector before
we know it's really a gstring.
(Ffont_shape_text): Fix typo.
(Ffont_shape_text, Ffont_otf_alternates): Fix up int/Lisp_Oject mixups.
2008-02-06 03:14:46 +00:00
Kenichi Handa
d9e11902b2 (font_find_for_lface): Fix previous change. Be sure to
close a font-object.
(Ffont_shape_text): If FONT_OBJECT is not a font-object, just
return TO.
2008-01-28 23:59:56 +00:00
Kenichi Handa
6c8ec042df (font_find_for_lface): Check if the character C is
supported or not only for the first font.
2008-01-28 07:05:07 +00:00
Kenichi Handa
c8ea71f686 (font_load_for_face): Handle the case that the font in
face->lface is a string.
2008-01-25 11:26:27 +00:00
Kenichi Handa
0a16d56798 *** empty log message *** 2008-01-14 01:33:28 +00:00
Kenichi Handa
95d0a34053 (Ffont_shape_text): Fix setting of `to' field of glyphs. 2008-01-07 12:28:30 +00:00
Kenichi Handa
e8912e41f8 (Ffont_shape_text): If the font driver doesn't have a
shaper function, make zero-width glyphs to have at least one-pixel
width.
2008-01-07 02:02:05 +00:00
Kenichi Handa
40fb53d667 (Ffont_fill_gstring): Stop filling when a character not
supported by the font is found.
(Ffont_shape_text): When a shape callback function returns nil,
try at most two more times with larger gstring.
(Ffont_at): Fix getting of w.  Call font_at with correct 5th
argument.
2007-12-25 10:36:06 +00:00
Kenichi Handa
b293711968 (Ffont_shape_text): Avoid unnecessary composition. 2007-12-21 01:38:14 +00:00
Jason Rumney
9ba6fd4149 (font_parse_fcname): Default weight and slant to normal.
(font_score): Prefer normal fonts if weight or slant unspecified.
(font_score) [WINDOWSNT]: Scale weight difference down to closer
match freetype scores.
2007-12-20 10:40:31 +00:00
Kenichi Handa
ca4da08aaa (font_prepare_cache, font_finish_cache, font_get_cache): New
functions.
(font_clear_cache): New function.
(font_list_entities): Use font_get_cache.
(font_matching_entity): Likewise.
(font_update_drivers): Call font_clear_cache when finishing a
driver.
2007-12-18 11:40:00 +00:00
Kenichi Handa
e670e82736 (Ffont_get): Fix arguments to Fassoc. 2007-12-18 02:26:27 +00:00
Kenichi Handa
e3ee03407f (font_at): Handle the case that the arg C is negative.
Handle the unibyte case.
(Ffont_at): Call font_at with the arg C -1.
2007-12-14 11:16:47 +00:00