mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-25 17:38:11 +02:00
src/cairoint.h src/cairo-font.c src/cairo-gstate.c: Add "cairo_simple_font_face" for family/weight/slant and use it to implement font naming for the toy API. src/cairo-ft.h src/cairo-ft-font.c cairo-win32.h cairo-win32-font.c: Switch the FreeType and Win32 backends over to using cairo_font_face_t. src/cairo.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Pass in font matrix and CTM separately rather than as a composite scale when creating fonts; allows removing font_matrix argument to metrics functions. src/cairoint.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Remove cairo_font_scale_t type, just use cairo_matrix_t and ignore translations. src/cairo-ft.h src/cairo-ft-font.c: Remove cairo_ft_font_get_pattern() -- it can't work for all FreeType backend fonts and doesn't seem particularly useful. Rename cairo_font_get_extents() to cairo_font_extents() split font functions into a separate section. Fix locking order problem. Add caches for simple font faces and from cairo_font_face_t to cairo_scaled_font_t. src/cairo.h src/cairoint.h src/cairo-font.c src/cairo-win32-font.c src/cairo-ft-font.c src/cairo-gstate.c src/cairo-gstate-private.h: Rename cairo_font_t to cairo_scaled_font_t.
68 lines
2.2 KiB
C
68 lines
2.2 KiB
C
/* cairo - a vector graphics library with display and print output
|
|
*
|
|
* Copyright © 2005 Red Hat, Inc
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it either under the terms of the GNU Lesser General Public
|
|
* License version 2.1 as published by the Free Software Foundation
|
|
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
|
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
|
* notice, a recipient may use your version of this file under either
|
|
* the MPL or the LGPL.
|
|
*
|
|
* You should have received a copy of the LGPL along with this library
|
|
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
* You should have received a copy of the MPL along with this library
|
|
* in the file COPYING-MPL-1.1
|
|
*
|
|
* The contents of this file are subject to the Mozilla Public License
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
* http://www.mozilla.org/MPL/
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
|
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
|
* the specific language governing rights and limitations.
|
|
*
|
|
* The Original Code is the cairo graphics library.
|
|
*
|
|
* The Initial Developer of the Original Code is Red Hat, Inc.
|
|
*
|
|
* Contributor(s):
|
|
* Graydon Hoare <graydon@redhat.com>
|
|
* Owen Taylor <otaylor@redhat.com>
|
|
*/
|
|
|
|
#ifndef CAIRO_FT_H
|
|
#define CAIRO_FT_H
|
|
|
|
#include <cairo.h>
|
|
|
|
#ifdef CAIRO_HAS_FT_FONT
|
|
|
|
/* Fontconfig/Freetype platform-specific font interface */
|
|
|
|
#include <fontconfig/fontconfig.h>
|
|
#include <ft2build.h>
|
|
#include FT_FREETYPE_H
|
|
|
|
CAIRO_BEGIN_DECLS
|
|
|
|
cairo_font_face_t *
|
|
cairo_ft_font_face_create_for_pattern (FcPattern *pattern);
|
|
|
|
cairo_font_face_t *
|
|
cairo_ft_font_face_create_for_ft_face (FT_Face face,
|
|
int load_flags);
|
|
|
|
FT_Face
|
|
cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font);
|
|
|
|
void
|
|
cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font);
|
|
|
|
CAIRO_END_DECLS
|
|
|
|
#endif /* CAIRO_HAS_FT_FONT */
|
|
#endif /* CAIRO_FT_H */
|