diff options
| author | Kenichi Handa | 2008-05-30 02:35:54 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-30 02:35:54 +0000 |
| commit | 22b7086bdb9c73c1381b74e5f6a11aa8f7830a18 (patch) | |
| tree | 0db36b3801e998d7502883a706cd50504a7861ae /src | |
| parent | 72606e458007f845e104d7dfd9368b8c5b966b6e (diff) | |
| download | emacs-22b7086bdb9c73c1381b74e5f6a11aa8f7830a18.tar.gz emacs-22b7086bdb9c73c1381b74e5f6a11aa8f7830a18.zip | |
* fontset.c (Ffont_info): Moved to font.c.
(syms_of_fontset): Delete defsubr of Sfont_info.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/fontset.c b/src/fontset.c index f8c867a6e26..d384dd41345 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1633,61 +1633,6 @@ fontset_from_font (font_object) | |||
| 1633 | return XINT (FONTSET_ID (fontset)); | 1633 | return XINT (FONTSET_ID (fontset)); |
| 1634 | } | 1634 | } |
| 1635 | 1635 | ||
| 1636 | DEFUN ("font-info", Ffont_info, Sfont_info, 1, 2, 0, | ||
| 1637 | doc: /* Return information about a font named NAME on frame FRAME. | ||
| 1638 | If FRAME is omitted or nil, use the selected frame. | ||
| 1639 | The returned value is a vector of OPENED-NAME, FULL-NAME, CHARSET, SIZE, | ||
| 1640 | HEIGHT, BASELINE-OFFSET, RELATIVE-COMPOSE, and DEFAULT-ASCENT, | ||
| 1641 | where | ||
| 1642 | OPENED-NAME is the name used for opening the font, | ||
| 1643 | FULL-NAME is the full name of the font, | ||
| 1644 | SIZE is the maximum bound width of the font, | ||
| 1645 | HEIGHT is the height of the font, | ||
| 1646 | BASELINE-OFFSET is the upward offset pixels from ASCII baseline, | ||
| 1647 | RELATIVE-COMPOSE and DEFAULT-ASCENT are the numbers controlling | ||
| 1648 | how to compose characters. | ||
| 1649 | If the named font is not yet loaded, return nil. */) | ||
| 1650 | (name, frame) | ||
| 1651 | Lisp_Object name, frame; | ||
| 1652 | { | ||
| 1653 | FRAME_PTR f; | ||
| 1654 | struct font *font; | ||
| 1655 | Lisp_Object info; | ||
| 1656 | Lisp_Object font_object; | ||
| 1657 | |||
| 1658 | (*check_window_system_func) (); | ||
| 1659 | |||
| 1660 | CHECK_STRING (name); | ||
| 1661 | name = Fdowncase (name); | ||
| 1662 | if (NILP (frame)) | ||
| 1663 | frame = selected_frame; | ||
| 1664 | CHECK_LIVE_FRAME (frame); | ||
| 1665 | f = XFRAME (frame); | ||
| 1666 | |||
| 1667 | font_object = font_open_by_name (f, (char *) SDATA (name)); | ||
| 1668 | if (NILP (font_object)) | ||
| 1669 | return Qnil; | ||
| 1670 | font = XFONT_OBJECT (font_object); | ||
| 1671 | |||
| 1672 | info = Fmake_vector (make_number (7), Qnil); | ||
| 1673 | XVECTOR (info)->contents[0] = AREF (font_object, FONT_NAME_INDEX); | ||
| 1674 | XVECTOR (info)->contents[1] = AREF (font_object, FONT_NAME_INDEX); | ||
| 1675 | XVECTOR (info)->contents[2] = make_number (font->pixel_size); | ||
| 1676 | XVECTOR (info)->contents[3] = make_number (font->height); | ||
| 1677 | XVECTOR (info)->contents[4] = make_number (font->baseline_offset); | ||
| 1678 | XVECTOR (info)->contents[5] = make_number (font->relative_compose); | ||
| 1679 | XVECTOR (info)->contents[6] = make_number (font->default_ascent); | ||
| 1680 | |||
| 1681 | #if 0 | ||
| 1682 | /* As font_object is still in FONT_OBJLIST of the entity, we can't | ||
| 1683 | close it now. Perhaps, we should manage font-objects | ||
| 1684 | by `reference-count'. */ | ||
| 1685 | font_close_object (f, font_object); | ||
| 1686 | #endif | ||
| 1687 | return info; | ||
| 1688 | } | ||
| 1689 | |||
| 1690 | |||
| 1691 | /* Return a cons (FONT-NAME . GLYPH-CODE). | 1636 | /* Return a cons (FONT-NAME . GLYPH-CODE). |
| 1692 | FONT-NAME is the font name for the character at POSITION in the current | 1637 | FONT-NAME is the font name for the character at POSITION in the current |
| 1693 | buffer. This is computed from all the text properties and overlays | 1638 | buffer. This is computed from all the text properties and overlays |
| @@ -2143,7 +2088,6 @@ at the vertical center of lines. */); | |||
| 2143 | defsubr (&Squery_fontset); | 2088 | defsubr (&Squery_fontset); |
| 2144 | defsubr (&Snew_fontset); | 2089 | defsubr (&Snew_fontset); |
| 2145 | defsubr (&Sset_fontset_font); | 2090 | defsubr (&Sset_fontset_font); |
| 2146 | defsubr (&Sfont_info); | ||
| 2147 | defsubr (&Sinternal_char_font); | 2091 | defsubr (&Sinternal_char_font); |
| 2148 | defsubr (&Sfontset_info); | 2092 | defsubr (&Sfontset_info); |
| 2149 | defsubr (&Sfontset_font); | 2093 | defsubr (&Sfontset_font); |