Mercurial > emacs
view src/fontset.h @ 92870:8f17f65dd575
* textmodes/org.el (org-ctrl-c-star): Implement a missing branch
in the decision tree.
(org-select-remember-template): Cleaned the code.
(org-prepare-dblock): Added the extra :content parameter.
(org-write-agenda): New output type ".ics" files.
(org-write-agenda): Call `org-icalendar-verify-function', both for
time stamps and for TODO entries.
(org-agenda-collect-markers, org-create-marker-find-array)
(org-check-agenda-marker-table): New functions.
(org-agenda-marker-table): New variable.
(org-export-as-html): Revert the change that killed the html
buffer. Side effects first need to be studied carefully.
(org-get-tags-at): Fix the structure of the condition-case
statement.
(org-ts-regexp0, org-repeat-re, org-display-custom-time)
(org-timestamp-change): Fix regulear expressions to swallow the
extra character for repeat-shift control.
(org-auto-repeat-maybe): Implement the new repeater mechanisms.
(org-get-legal-level): Aliased to `org-get-valid-level'.
(org-dblock-write:clocktable): Added a :link parameter, linking
headlines to their location in the Org agenda files.
(org-get-tags-at): Bugfix: prevent `org-back-to-heading' from
throwing an error when getting tags before headlines.
(org-timestamp-change, org-modify-ts-extra)
(org-ts-regexp1): Fix timestamp editing.
(org-agenda-custom-commands-local-options): New constant.
(org-agenda-custom-commands): Use
`org-agenda-custom-commands-local-options' to improve customize
type. "htmlize": Removed hack to fix face problem with htmlize,
it no longer seem necessary.
(org-follow-link-hook): New hook.
(org-agenda-custom-commands): Added "Component" as a tag for each
item in a command serie.
(org-open-at-point): Run `org-follow-link-hook'.
(org-agenda-schedule): Bugfix: don't display marker type when it
is `nil'.
(org-store-link): org-irc required.
(org-set-regexps-and-options): Parse the new logging options.
(org-extract-log-state-settings): New function.
(org-todo): Handle the new ways of recording state change stuff.
(org-local-logging): New function.
(org-columns-open-link): Fixed bug with opening link in column
view.
(org-local-logging): New function
(org-todo): Make sure that LOGGING properties are honoured.
(org-todo-keywords): Improve docstring.
(org-startup-options): Cleanup startup options.
(org-set-regexps-and-options): Process the "!" markers.
(org-todo): Respect the new logging stuff.
(org-log-note-how): New variable.
(org-add-log-maybe): New parameter HOW that defines how logging
should be done and also overrides PURPOSE. Add a docstring.
(org-add-log-note): Check if we really need to ask for a note.
(org-get-current-options): Digest the new keyword.
(org-agenda-reset-markers): Renamed from
`org-agenda-maybe-reset-markers'. FORCE argument removed.
(org-diary, org-agenda-quit, org-prepare-agenda): Call the renamed
function, without force argument.
(org-buffer-property-keys): Bind local variables s and p.
(org-make-tags-matcher): Allow "" to match an empty or
non-existent property value.
(org-export-as-html): Join unsorted lists when they directly
follow each other. Such lists may be created by headlines that
are converted to lists.
(org-nofm-to-completion): New function.
(org-export-as-html): Use :html-extension instead of
org-export-html-extension.
(org-store-link): Support for links from `rmail-summary-mode'.
(org-columns-new, org-complete, org-set-property): Set the
`include-columns' argument in the call to
`org-buffer-property-keys'.
(org-buffer-property-keys): New argument `include-columns', to
include properties expected by any of the COLUMS formats in the
current buffer.
(org-cleaned-string-for-export): Get rid of drawers first, so that
they will be removed also in the text before the first headline.
(org-clock-report): Show the clocktable when found.
(org-refile): Fix positioning bug when `org-reverse-note-order' is
nil.
(org-version): With prefix argument, insert `org-version' at
point.
(org-agenda-goto): Recenter the window after finding the target
location, to make sure the correct position will be displayed.
(org-agenda-get-deadlines): Don't scale priority with the warning
period.
(org-insert-heading): Don't break line in the middle of the line.
(org-agenda-get-deadlines): Allow `org-deadline-warning-days' to
be 0.
(org-update-checkbox-count): Revamped to deal with hierarchical
beckboxes. This was a patch from Miguel A. Figueroa-Villanueva.
(org-remove-timestamp-with-keyword): New function.
(org-schedule, org-deadline): Use
`org-remove-timestamp-with-keyword' to make sure all such time
stamps are removed.
(org-mode): Support for `align'.
(org-agenda-get-deadlines): Make sure priorities increase as the
due date approaches and is passed.
(org-remember-apply-template): Fixed problem with tags that
contain "_" or "@".
(org-make-link-regexps): Improve the regular expression for plain
links.
(org-agenda-get-closed): List each clocking entry.
(org-set-tags): Only tabify before tags if indent-tabs-mode is t.
(org-special-ctrl-k): New option.
(org-kill-line): New function.
(org-archive-all-done): Fixed incorrect number of stars in regexp.
(org-refile-get-location): New function.
(org-refile-goto-last-stored): New function.
(org-global-tags-completion-table): Add the value of org-tag-alist
in each buffer, to make sure that also unused tags will be
available for completion.
(org-columns-edit-value)
(org-columns-next-allowed-value): Only update if not in agenda.
(org-clocktable-steps): New function.
(org-dblock-write:clocktable): Call `org-clocktable-steps'.
(org-archive-subtree): Add the outline tree context as a property.
(org-closest-date): New optional argument `prefer'.
(org-goto-auto-isearch): New option.
(org-goto-map, org-get-location): Implement auto-isearch.
(org-goto-local-auto-isearch-map): New variable.
(org-goto-local-search-forward-headings)
(org-goto-local-auto-isearch): New functions
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Thu, 13 Mar 2008 08:54:11 +0000 |
parents | 606f2d163a64 |
children | 1a920d0cdcb9 |
line wrap: on
line source
/* Header for fontset handler. Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H14PRO021 Copyright (C) 2003, 2006 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H13PRO009 This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef EMACS_FONTSET_H #define EMACS_FONTSET_H /* This data type is used for the font_table field of window system depending data area (e.g. struct x_display_info on X window). */ struct font_info { /* Pointer to window system dependent font structure. On X window, this value should be coerced to (XFontStruct *). */ void *font; /* Index number of the font. */ int font_idx; /* Name to be used to find the font. */ char *name; /* Full name of the font given by a window system. */ char *full_name; /* Charset to encode a character code into a glyph code of the font. */ int charset; #ifdef WINDOWSNT /* Codepage of characters that will be displayed by the font. */ int codepage; #endif /* Maximum bound width over all existing characters of the font. On X window, this is same as (font->max_bounds.width) */ int size; /* Height of the font. On X window, this is the same as (font->ascent + font->descent). */ int height; /* Width of the space glyph of the font. */ int space_width; /* Average width of glyphs in the font. */ int average_width; /* 1 if `vertical-centering-font-regexp' matches this font name. In this case, we render characters at vartical center positions of lines. */ int vertical_centering; /* Encoding type of the font. The value is one of 0, 1, 2, or 3: 0: code points 0x20..0x7F or 0x2020..0x7F7F are used 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used 2: code points 0x20A0..0x7FFF are used 3: code points 0xA020..0xFF7F are used If the member `font_encoder' is not NULL, this member is ignored. */ unsigned char encoding_type; /* The baseline position of a font is normally `ascent' value of the font. However, there exists many fonts which don't set `ascent' an appropriate value to be used as baseline position. This is typical in such ASCII fonts which are designed to be used with Chinese, Japanese, Korean characters. When we use mixture of such fonts and normal fonts (having correct `ascent' value), a display line gets very ugly. Since we have no way to fix it automatically, it is users responsibility to supply well designed fonts or correct `ascent' value of fonts. But, the latter requires heavy work (modifying all bitmap data in BDF files). So, Emacs accepts a private font property `_MULE_BASELINE_OFFSET'. If a font has this property, we calculate the baseline position by subtracting the value from `ascent'. In other words, the value indicates how many bits higher we should draw a character of the font than normal ASCII text for a better looking. We also have to consider the fact that the concept of `baseline' differs among languages to which each character belongs. For instance, baseline should be at the bottom most position of all glyphs for Chinese, Japanese, and Korean. But, many of existing fonts for those characters doesn't have correct `ascent' values because they are designed to be used with ASCII fonts. To display characters of different language on the same line, the best way will be to arrange them in the middle of the line. So, in such a case, again, we utilize the font property `_MULE_BASELINE_OFFSET'. If the value is larger than `ascent' we calculate baseline so that a character is arranged in the middle of a line. */ int baseline_offset; /* Non zero means a character should be composed at a position relative to the height (or depth) of previous glyphs in the following cases: (1) The bottom of the character is higher than this value. In this case, the character is drawn above the previous glyphs. (2) The top of the character is lower than 0 (i.e. baseline height). In this case, the character is drawn beneath the previous glyphs. This value is taken from a private font property `_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */ int relative_compose; /* Non zero means an ascent value to be used for a character registered in char-table `use-default-ascent'. */ int default_ascent; /* CCL program to calculate code points of the font. */ struct ccl_program *font_encoder; }; /* A value which may appear in the member `encoding' of struch font_info indicating that a font itself doesn't tell which encoding to be used. */ #define FONT_ENCODING_NOT_DECIDED 255 enum FONT_SPEC_INDEX { FONT_SPEC_FAMILY_INDEX, FONT_SPEC_WEIGHT_INDEX, FONT_SPEC_SLANT_INDEX, FONT_SPEC_SWIDTH_INDEX, FONT_SPEC_ADSTYLE_INDEX, FONT_SPEC_REGISTRY_INDEX, FONT_SPEC_MAX_INDEX }; /* Forward declaration for prototypes. */ struct frame; /* The following six are window system dependent functions. Initialization routine of each window system should set appropriate functions to these variables. For instance, in case of X window, x_term_init does this. */ /* Return a pointer to struct font_info of font FONT_IDX of frame F. */ extern struct font_info *(*get_font_info_func) P_ ((struct frame *f, int font_idx)); /* Return a list of font names which matches PATTERN. See the document of `x-list-fonts' for more detail. */ extern Lisp_Object (*list_fonts_func) P_ ((struct frame *f, Lisp_Object pattern, int size, int maxnames)); /* Load a font named NAME for frame F and return a pointer to the information of the loaded font. If loading is failed, return -1. */ extern struct font_info *(*load_font_func) P_ ((struct frame *f, char *name, int)); /* Return a pointer to struct font_info of a font named NAME for frame F. If no such font is loaded, return NULL. */ extern struct font_info *(*query_font_func) P_ ((struct frame *f, char *name)); /* Additional function for setting fontset or changing fontset contents of frame F. This function may change the coordinate of the frame. */ extern void (*set_frame_fontset_func) P_ ((struct frame *f, Lisp_Object arg, Lisp_Object oldval)); /* To find a CCL program, fs_load_font calls this function. The argument is a pointer to the struct font_info. This function set the memer `encoder' of the structure. */ extern void (*find_ccl_program_func) P_ ((struct font_info *)); extern Lisp_Object (*get_font_repertory_func) P_ ((struct frame *, struct font_info *)); /* Check if any window system is used now. */ extern void (*check_window_system_func) P_ ((void)); struct face; extern void free_face_fontset P_ ((FRAME_PTR, struct face *)); extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, struct face *, int)); extern int face_suitable_for_char_p P_ ((struct face *, int)); extern int face_for_char P_ ((FRAME_PTR, struct face *, int, int, Lisp_Object)); extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int, struct face *)); extern int new_fontset_from_font_name P_ ((Lisp_Object)); extern void set_default_ascii_font P_ ((Lisp_Object)); extern struct font_info *fs_load_font P_ ((struct frame *, char *, int)); extern int fs_query_fontset P_ ((Lisp_Object, int)); EXFUN (Fquery_fontset, 2); extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int)); extern Lisp_Object Vuse_default_ascent; extern Lisp_Object Vignore_relative_composition; extern Lisp_Object Valternate_fontname_alist; extern Lisp_Object Vfontset_alias_alist; extern Lisp_Object Vvertical_centering_font_regexp; extern Lisp_Object Votf_script_alist; /* Load a font named FONTNAME on frame F. All fonts for frame F is stored in a table pointed by FONT_TABLE. Return a pointer to the struct font_info of the loaded font. If loading fails, return NULL. */ #define FS_LOAD_FONT(f, fontname) fs_load_font (f, fontname, -1) /* Return an immutable id for font_info FONT_INFO on frame F. The reason for this macro is hat one cannot hold pointers to font_info structures in other data structures, because the table is reallocated in x_list_fonts. */ #define FONT_INFO_ID(F, FONT_INFO) \ (FONT_INFO) - (FRAME_X_DISPLAY_INFO ((F))->font_table) /* Given a font_info id ID, return a pointer to the font_info structure on frame F. If ID is invalid, return null. */ #define FONT_INFO_FROM_ID(F, ID) \ (((ID) >= 0 && (ID) < FRAME_X_DISPLAY_INFO ((F))->font_table_size) \ ? (FRAME_X_DISPLAY_INFO ((F))->font_table + (ID)) \ : 0) #ifdef USE_FONT_BACKEND #define FONT_INFO_FROM_FACE(F, FACE) \ (enable_font_backend ? (FACE)->font_info \ : FONT_INFO_FROM_ID ((F), (FACE)->font_info_id)) #else /* not USE_FONT_BACKEND */ #define FONT_INFO_FROM_FACE(F, FACE) \ FONT_INFO_FROM_ID ((F), (FACE)->font_info_id) #endif /* not USE_FONT_BACKEND */ extern Lisp_Object fontset_name P_ ((int)); extern Lisp_Object fontset_ascii P_ ((int)); extern int fontset_height P_ ((int)); #ifdef USE_FONT_BACKEND struct font; extern int face_for_font P_ ((struct frame *, struct font *, struct face *)); extern int new_fontset_from_font P_ ((Lisp_Object)); extern struct font *fontset_ascii_font P_ ((FRAME_PTR, int)); #endif /* USE_FONT_BACKEND */ #endif /* EMACS_FONTSET_H */ /* arch-tag: c27cef7b-3cab-488a-8398-7a4daa96bb77 (do not change this comment) */