2 * Copyright (c) 2007-2010 SlimDX Group
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 extern const IID IID_IDWriteFontFace;
26 #include "../ComObject.h"
27 #include "../direct2d/Matrix3x2.h"
28 #include "../direct2d/SimplifiedGeometrySink.h"
31 #include "FontMetrics.h"
32 #include "GlyphMetrics.h"
34 #include "GlyphOffset.h"
35 #include "RenderingParameters.h"
36 #include "FontTable.h"
42 public ref class FontFace : public ComObject
44 COMOBJECT(IDWriteFontFace, FontFace);
47 array<GlyphMetrics>^ GetDesignGlyphMetrics(array<short>^ indices, bool isSideways);
48 array<GlyphMetrics>^ GetGdiCompatibleGlyphMetrics(float size, float pixelsPerDip, bool useGdiNatural, bool isSideways, array<short>^ indices);
49 array<GlyphMetrics>^ GetGdiCompatibleGlyphMetrics(float size, float pixelsPerDip, bool useGdiNatural, bool isSideways, array<short>^ indices, SlimDX::Direct2D::Matrix3x2 transform);
50 array<short>^ GetGlyphIndices(array<int>^ codePoints);
51 array<FontFile^>^ GetFiles();
53 FontMetrics GetGdiCompatibleMetrics(float size, float pixelsPerDip);
54 FontMetrics GetGdiCompatibleMetrics(float size, float pixelsPerDip, SlimDX::Direct2D::Matrix3x2 transform);
56 Result GetGlyphRunOutline(float size, array<short>^ glyphIndices, array<float>^ glyphAdvances, array<GlyphOffset>^ glyphOffsets, bool isSideways, bool isRightToLeft, SlimDX::Direct2D::SimplifiedGeometrySink^ geometrySink);
57 RenderingMode GetRecommendedRenderingMode(float size, float pixelsPerDip, MeasuringMode measuringMode, RenderingParameters^ renderingParameters);
59 FontTable^ GetFontTable(int tableTag);
60 FontTable^ GetFontTable(char a, char b, char c, char d);
61 void ReleaseFontTable(FontTable^ table);
63 property FontFaceType Type
68 property FontMetrics Metrics
73 property FontSimulations Simulations
75 FontSimulations get();
78 property bool IsSymbolFont
83 property int GlyphCount