|
Packit Service |
e3b512 |
/* Copyright (C) 2008 Jonathon Jongsma
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
e3b512 |
* modify it under the terms of the GNU Library General Public
|
|
Packit Service |
e3b512 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
e3b512 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
e3b512 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
e3b512 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
e3b512 |
* Library General Public License for more details.
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* You should have received a copy of the GNU Library General Public
|
|
Packit Service |
e3b512 |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
e3b512 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
e3b512 |
* 02110-1301, USA.
|
|
Packit Service |
e3b512 |
*/
|
|
Packit Service |
e3b512 |
#ifndef __CAIROMM_QUARTZ_FONT_H
|
|
Packit Service |
e3b512 |
#define __CAIROMM_QUARTZ_FONT_H
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
#include <cairo-features.h>
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
#ifdef CAIRO_HAS_QUARTZ_FONT
|
|
Packit Service |
e3b512 |
#include <cairo-quartz.h>
|
|
Packit Service |
e3b512 |
#include <cairomm/fontface.h>
|
|
Packit Service |
e3b512 |
#include <cairomm/scaledfont.h>
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
namespace Cairo
|
|
Packit Service |
e3b512 |
{
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
/**
|
|
Packit Service |
e3b512 |
* The Quartz font backend is primarily used to render text on Apple
|
|
Packit Service |
e3b512 |
* MacOS X systems. The CGFont API is used for the internal
|
|
Packit Service |
e3b512 |
* implementation of the font backend methods.
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* @since 1.8
|
|
Packit Service |
e3b512 |
*/
|
|
Packit Service |
e3b512 |
class QuartzFontFace : public FontFace
|
|
Packit Service |
e3b512 |
{
|
|
Packit Service |
e3b512 |
public:
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
/** Creates a new font for the Quartz font backend based on a CGFontRef. This
|
|
Packit Service |
e3b512 |
* font can then be used with Context::set_font_face() or
|
|
Packit Service |
e3b512 |
* ScaledFont::create().
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* @param font a CGFontRef obtained through a method external to cairo.
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* @since 1.8
|
|
Packit Service |
e3b512 |
*/
|
|
Packit Service |
e3b512 |
static RefPtr<QuartzFontFace> create(CGFontRef font);
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
#ifndef __LP64__
|
|
Packit Service |
e3b512 |
/** Creates a new font for the Quartz font backend based on an ATSUFontID.
|
|
Packit Service |
e3b512 |
* This font can then be used with Context::set_font_face() or
|
|
Packit Service |
e3b512 |
* ScaledFont::create().
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* @param font_id an ATSUFontID for the font.
|
|
Packit Service |
e3b512 |
*
|
|
Packit Service |
e3b512 |
* @since 1.8
|
|
Packit Service |
e3b512 |
*/
|
|
Packit Service |
e3b512 |
static RefPtr<QuartzFontFace> create(ATSUFontID font_id);
|
|
Packit Service |
e3b512 |
#endif
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
protected:
|
|
Packit Service |
e3b512 |
QuartzFontFace(CGFontRef font);
|
|
Packit Service |
e3b512 |
#ifndef __LP64__
|
|
Packit Service |
e3b512 |
QuartzFontFace(ATSUFontID font_id);
|
|
Packit Service |
e3b512 |
#endif
|
|
Packit Service |
e3b512 |
};
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
}
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
#endif // CAIRO_HAS_QUARTZ_FONT
|
|
Packit Service |
e3b512 |
|
|
Packit Service |
e3b512 |
#endif // __CAIROMM_QUARTZ_FONT_H
|