[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117501: Next minor cleanup of font subsystem.
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r117501: Next minor cleanup of font subsystem. |
Date: |
Wed, 09 Jul 2014 06:26:26 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117501
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2014-07-09 10:25:35 +0400
message:
Next minor cleanup of font subsystem.
* font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
users) and FONT_FORMAT_INDEX (set by a few font drivers but never
really used).
(FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
unused.
* ftfont.h (ftfont_font_format): Remove prototype.
* ftfont.c (ftfont_font_format): Remove; now unused.
(ftfont_open):
* nsfont.m (nsfont_open):
* w32font.c (w32font_open_internal):
* w32uniscribe.c (uniscribe_open):
* xfont.c (xfont_open):
* xftfont.c (xftfont_open): All users changed.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/font.h font.h-20091113204419-o5vbwnq5f7feedwu-8541
src/ftfont.c ftfont.c-20091113204419-o5vbwnq5f7feedwu-8542
src/ftfont.h ftfont.h-20091113204419-o5vbwnq5f7feedwu-8543
src/nsfont.m nsfont.m-20091113204419-o5vbwnq5f7feedwu-8748
src/w32font.c w32font.c-20091113204419-o5vbwnq5f7feedwu-8545
src/w32uniscribe.c
w32uniscribe.c-20091113204419-o5vbwnq5f7feedwu-8619
src/xfont.c xfont.c-20091113204419-o5vbwnq5f7feedwu-8547
src/xftfont.c xftfont.c-20091113204419-o5vbwnq5f7feedwu-8548
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-07-09 02:04:12 +0000
+++ b/src/ChangeLog 2014-07-09 06:25:35 +0000
@@ -1,3 +1,20 @@
+2014-07-09 Dmitry Antipov <address@hidden>
+
+ Next minor cleanup of font subsystem.
+ * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
+ users) and FONT_FORMAT_INDEX (set by a few font drivers but never
+ really used).
+ (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
+ unused.
+ * ftfont.h (ftfont_font_format): Remove prototype.
+ * ftfont.c (ftfont_font_format): Remove; now unused.
+ (ftfont_open):
+ * nsfont.m (nsfont_open):
+ * w32font.c (w32font_open_internal):
+ * w32uniscribe.c (uniscribe_open):
+ * xfont.c (xfont_open):
+ * xftfont.c (xftfont_open): All users changed.
+
2014-07-09 Eli Zaretskii <address@hidden>
* xdisp.c (move_it_to): Adjust calculation of line_start_x to what
=== modified file 'src/font.h'
--- a/src/font.h 2014-07-08 14:50:45 +0000
+++ b/src/font.h 2014-07-09 06:25:35 +0000
@@ -162,9 +162,6 @@
/* List of font-objects opened from the font-entity. */
FONT_OBJLIST_INDEX = FONT_SPEC_MAX,
- /* Font-entity from which the font-object is opened. */
- FONT_ENTITY_INDEX = FONT_SPEC_MAX,
-
/* This value is the length of font-entity vector. */
FONT_ENTITY_MAX,
@@ -182,9 +179,6 @@
is not available. */
FONT_FILE_INDEX,
- /* Format of the font (symbol) or nil if unknown. */
- FONT_FORMAT_INDEX,
-
/* This value is the length of font-object vector. */
FONT_OBJECT_MAX
};
@@ -442,15 +436,6 @@
#define FONT_OBJECT_P(x) \
(FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX)
-/* True iff ENTITY can't be loaded. */
-#define FONT_ENTITY_NOT_LOADABLE(entity) \
- EQ (AREF (entity, FONT_OBJLIST_INDEX), Qt)
-
-/* Flag ENTITY not loadable. */
-#define FONT_ENTITY_SET_NOT_LOADABLE(entity) \
- ASET (entity, FONT_OBJLIST_INDEX, Qt)
-
-
/* Check macros for various font-related objects. */
#define CHECK_FONT(x) \
=== modified file 'src/ftfont.c'
--- a/src/ftfont.c 2014-07-08 14:50:45 +0000
+++ b/src/ftfont.c 2014-07-09 06:25:35 +0000
@@ -1223,7 +1223,6 @@
font_object = font_build_object (VECSIZE (struct ftfont_info),
Qfreetype, entity, size);
ASET (font_object, FONT_FILE_INDEX, filename);
- ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (NULL, filename));
font = XFONT_OBJECT (font_object);
ftfont_info = (struct ftfont_info *) font;
ftfont_info->ft_size = ft_face->size;
@@ -2587,46 +2586,6 @@
#endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
#endif /* HAVE_LIBOTF */
-Lisp_Object
-ftfont_font_format (FcPattern *pattern, Lisp_Object filename)
-{
- FcChar8 *str;
-
-#ifdef FC_FONTFORMAT
- if (pattern)
- {
- if (FcPatternGetString (pattern, FC_FONTFORMAT, 0, &str) !=
FcResultMatch)
- return Qnil;
- if (strcmp ((char *) str, "TrueType") == 0)
- return intern ("truetype");
- if (strcmp ((char *) str, "Type 1") == 0)
- return intern ("type1");
- if (strcmp ((char *) str, "PCF") == 0)
- return intern ("pcf");
- if (strcmp ((char *) str, "BDF") == 0)
- return intern ("bdf");
- }
-#endif /* FC_FONTFORMAT */
- if (STRINGP (filename))
- {
- int len = SBYTES (filename);
-
- if (len >= 4)
- {
- str = (FcChar8 *) (SDATA (filename) + len - 4);
- if (xstrcasecmp ((char *) str, ".ttf") == 0)
- return intern ("truetype");
- if (xstrcasecmp ((char *) str, ".pfb") == 0)
- return intern ("type1");
- if (xstrcasecmp ((char *) str, ".pcf") == 0)
- return intern ("pcf");
- if (xstrcasecmp ((char *) str, ".bdf") == 0)
- return intern ("bdf");
- }
- }
- return intern ("unknown");
-}
-
static const char *const ftfont_booleans [] = {
":antialias",
":hinting",
=== modified file 'src/ftfont.h'
--- a/src/ftfont.h 2011-01-15 23:16:57 +0000
+++ b/src/ftfont.h 2014-07-09 06:25:35 +0000
@@ -36,7 +36,6 @@
#endif /* HAVE_M17N_FLT */
#endif /* HAVE_LIBOTF */
-extern Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
#endif /* EMACS_FTFONT_H */
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2014-07-08 14:19:34 +0000
+++ b/src/nsfont.m 2014-07-09 06:25:35 +0000
@@ -830,9 +830,6 @@
font->baseline_offset = 0;
font->relative_compose = 0;
- font->props[FONT_FORMAT_INDEX] = Qns;
- font->props[FONT_FILE_INDEX] = Qnil;
-
{
const char *fontName = [[nsfont fontName] UTF8String];
=== modified file 'src/w32font.c'
--- a/src/w32font.c 2014-07-04 02:28:54 +0000
+++ b/src/w32font.c 2014-07-09 06:25:35 +0000
@@ -886,7 +886,7 @@
LOGFONT logfont;
HDC dc;
HFONT hfont, old_font;
- Lisp_Object val, extra;
+ Lisp_Object val;
struct w32font_info *w32_font;
struct font * font;
OUTLINETEXTMETRICW* metrics = NULL;
@@ -979,21 +979,6 @@
font->default_ascent = w32_font->metrics.tmAscent;
font->pixel_size = size;
font->driver = &w32font_driver;
- /* Use format cached during list, as the information we have access to
- here is incomplete. */
- extra = AREF (font_entity, FONT_EXTRA_INDEX);
- if (CONSP (extra))
- {
- val = assq_no_quit (QCformat, extra);
- if (CONSP (val))
- font->props[FONT_FORMAT_INDEX] = XCDR (val);
- else
- font->props[FONT_FORMAT_INDEX] = Qunknown;
- }
- else
- font->props[FONT_FORMAT_INDEX] = Qunknown;
-
- font->props[FONT_FILE_INDEX] = Qnil;
font->encoding_charset = -1;
font->repertory_charset = -1;
/* TODO: do we really want the minimum width here, which could be negative?
*/
=== modified file 'src/w32uniscribe.c'
--- a/src/w32uniscribe.c 2014-07-04 02:28:54 +0000
+++ b/src/w32uniscribe.c 2014-07-09 06:25:35 +0000
@@ -127,8 +127,6 @@
/* Uniscribe backend uses glyph indices. */
uniscribe_font->w32_font.glyph_idx = ETO_GLYPH_INDEX;
- /* Mark the format as opentype */
- uniscribe_font->w32_font.font.props[FONT_FORMAT_INDEX] = Qopentype;
uniscribe_font->w32_font.font.driver = &uniscribe_font_driver;
return font_object;
=== modified file 'src/xfont.c'
--- a/src/xfont.c 2014-07-04 02:28:54 +0000
+++ b/src/xfont.c 2014-07-09 06:25:35 +0000
@@ -804,8 +804,6 @@
ASET (font_object, FONT_NAME_INDEX, make_string (buf, len));
}
ASET (font_object, FONT_FULLNAME_INDEX, fullname);
- ASET (font_object, FONT_FILE_INDEX, Qnil);
- ASET (font_object, FONT_FORMAT_INDEX, Qx);
font = XFONT_OBJECT (font_object);
((struct xfont_info *) font)->xfont = xfont;
((struct xfont_info *) font)->display = FRAME_X_DISPLAY (f);
=== modified file 'src/xftfont.c'
--- a/src/xftfont.c 2014-07-08 14:50:45 +0000
+++ b/src/xftfont.c 2014-07-09 06:25:35 +0000
@@ -343,8 +343,6 @@
font_object = font_build_object (VECSIZE (struct xftfont_info),
Qxft, entity, size);
ASET (font_object, FONT_FILE_INDEX, filename);
- ASET (font_object, FONT_FORMAT_INDEX,
- ftfont_font_format (xftfont->pattern, filename));
font = XFONT_OBJECT (font_object);
font->pixel_size = size;
font->driver = &xftfont_driver;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117501: Next minor cleanup of font subsystem.,
Dmitry Antipov <=