skia2/include/ports/SkHarfBuzzFont.h
epoger@google.com fd03db0fe9 Manually update copyright notices in files that defied the automated process
used in http://codereview.appspot.com/4816058/ ('Automatic update of all copyright notices to reflect new license terms.')

Note that the following files have been left alone, because they name
copyright holders outside of Google.  Please let me know if we need to update
these files:

experimental/CiCarbonSampleMain.c
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
Review URL: http://codereview.appspot.com/4806054

git-svn-id: http://skia.googlecode.com/svn/trunk@1981 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:24:55 +00:00

43 lines
1.1 KiB
C++

/*
* Copyright 2009 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkHarfBuzzFont_DEFINED
#define SkHarfBuzzFont_DEFINED
extern "C" {
#include "harfbuzz-shaper.h"
//#include "harfbuzz-unicode.h"
}
#include "SkTypes.h"
class SkPaint;
class SkTypeface;
class SkHarfBuzzFont {
public:
/** The subclass returns the typeface for this font, or NULL
*/
virtual SkTypeface* getTypeface() const = 0;
/** The subclass sets the text related attributes of the paint.
e.g. textSize, typeface, textSkewX, etc.
All of the attributes that could effect how the text is measured.
Color information (e.g. color, xfermode, shader, etc.) are not required.
*/
virtual void setupPaint(SkPaint*) const = 0;
/** Implementation of HB_GetFontTableFunc, using SkHarfBuzzFont* as
the first parameter.
*/
static HB_Error GetFontTableFunc(void* skharfbuzzfont, const HB_Tag tag,
HB_Byte* buffer, HB_UInt* len);
static const HB_FontClass& GetFontClass();
};
#endif