2 *******************************************************************************
4 * Copyright (C) 2016 and later: Unicode, Inc. and others.
5 * License & terms of use: http://www.unicode.org/copyright.html#License
7 *******************************************************************************
8 *******************************************************************************
10 * Copyright (C) 1999-2013, International Business Machines
11 * Corporation and others. All Rights Reserved.
13 *******************************************************************************
14 * file name: SimpleFontInstance.h
16 * created on: 03/30/2006
17 * created by: Eric R. Mader
20 #ifndef __SIMPLEFONTINSTANCE_H
21 #define __SIMPLEFONTINSTANCE_H
23 #include "layout/LETypes.h"
24 #include "layout/LEFontInstance.h"
28 class SimpleFontInstance : public LEFontInstance
36 const void *readFontTable(LETag tableTag) const;
39 SimpleFontInstance(float pointSize, LEErrorCode &status);
41 virtual ~SimpleFontInstance();
43 virtual const void *getFontTable(LETag tableTag) const;
45 virtual le_int32 getUnitsPerEM() const;
47 virtual le_int32 getAscent() const;
49 virtual le_int32 getDescent() const;
51 virtual le_int32 getLeading() const;
53 // We really want to inherit this method from the superclass, but some compilers
54 // issue a warning if we don't implement it...
55 virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth) const;
57 // We really want to inherit this method from the superclass, but some compilers
58 // issue a warning if we don't implement it...
59 virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const;
61 virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;
63 virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
65 virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
67 float getXPixelsPerEm() const;
69 float getYPixelsPerEm() const;
71 float getScaleFactorX() const;
73 float getScaleFactorY() const;