Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:02

0001 /* cairo - a vector graphics library with display and print output
0002  *
0003  * Copyright © 2005 Red Hat, Inc
0004  *
0005  * This library is free software; you can redistribute it and/or
0006  * modify it either under the terms of the GNU Lesser General Public
0007  * License version 2.1 as published by the Free Software Foundation
0008  * (the "LGPL") or, at your option, under the terms of the Mozilla
0009  * Public License Version 1.1 (the "MPL"). If you do not alter this
0010  * notice, a recipient may use your version of this file under either
0011  * the MPL or the LGPL.
0012  *
0013  * You should have received a copy of the LGPL along with this library
0014  * in the file COPYING-LGPL-2.1; if not, write to the Free Software
0015  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
0016  * You should have received a copy of the MPL along with this library
0017  * in the file COPYING-MPL-1.1
0018  *
0019  * The contents of this file are subject to the Mozilla Public License
0020  * Version 1.1 (the "License"); you may not use this file except in
0021  * compliance with the License. You may obtain a copy of the License at
0022  * http://www.mozilla.org/MPL/
0023  *
0024  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
0025  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
0026  * the specific language governing rights and limitations.
0027  *
0028  * The Original Code is the cairo graphics library.
0029  *
0030  * The Initial Developer of the Original Code is Red Hat, Inc.
0031  *
0032  * Contributor(s):
0033  *      Graydon Hoare <graydon@redhat.com>
0034  *  Owen Taylor <otaylor@redhat.com>
0035  */
0036 
0037 #ifndef CAIRO_FT_H
0038 #define CAIRO_FT_H
0039 
0040 #include "cairo.h"
0041 
0042 #if CAIRO_HAS_FT_FONT
0043 
0044 /* Fontconfig/Freetype platform-specific font interface */
0045 
0046 #include <ft2build.h>
0047 #include FT_FREETYPE_H
0048 
0049 #if CAIRO_HAS_FC_FONT
0050 #include <fontconfig/fontconfig.h>
0051 #endif
0052 
0053 CAIRO_BEGIN_DECLS
0054 
0055 cairo_public cairo_font_face_t *
0056 cairo_ft_font_face_create_for_ft_face (FT_Face         face,
0057                        int             load_flags);
0058 
0059 /**
0060  * cairo_ft_synthesize_t:
0061  * @CAIRO_FT_SYNTHESIZE_BOLD: Embolden the glyphs (redraw with a pixel offset)
0062  * @CAIRO_FT_SYNTHESIZE_OBLIQUE: Slant the glyph outline by 12 degrees to the
0063  * right.
0064  *
0065  * A set of synthesis options to control how FreeType renders the glyphs
0066  * for a particular font face.
0067  *
0068  * Individual synthesis features of a #cairo_ft_font_face_t can be set
0069  * using cairo_ft_font_face_set_synthesize(), or disabled using
0070  * cairo_ft_font_face_unset_synthesize(). The currently enabled set of
0071  * synthesis options can be queried with cairo_ft_font_face_get_synthesize().
0072  *
0073  * Note: that when synthesizing glyphs, the font metrics returned will only
0074  * be estimates.
0075  *
0076  * Since: 1.12
0077  **/
0078 typedef enum {
0079     CAIRO_FT_SYNTHESIZE_BOLD = 1 << 0,
0080     CAIRO_FT_SYNTHESIZE_OBLIQUE = 1 << 1
0081 } cairo_ft_synthesize_t;
0082 
0083 cairo_public void
0084 cairo_ft_font_face_set_synthesize (cairo_font_face_t *font_face,
0085                    unsigned int synth_flags);
0086 
0087 cairo_public void
0088 cairo_ft_font_face_unset_synthesize (cairo_font_face_t *font_face,
0089                      unsigned int synth_flags);
0090 
0091 cairo_public unsigned int
0092 cairo_ft_font_face_get_synthesize (cairo_font_face_t *font_face);
0093 
0094 
0095 cairo_public FT_Face
0096 cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font);
0097 
0098 cairo_public void
0099 cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font);
0100 
0101 #if CAIRO_HAS_FC_FONT
0102 
0103 cairo_public cairo_font_face_t *
0104 cairo_ft_font_face_create_for_pattern (FcPattern *pattern);
0105 
0106 cairo_public void
0107 cairo_ft_font_options_substitute (const cairo_font_options_t *options,
0108                   FcPattern                  *pattern);
0109 
0110 #endif
0111 
0112 CAIRO_END_DECLS
0113 
0114 #else  /* CAIRO_HAS_FT_FONT */
0115 # error Cairo was not compiled with support for the freetype font backend
0116 #endif /* CAIRO_HAS_FT_FONT */
0117 
0118 #endif /* CAIRO_FT_H */