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