OSDN Git Service

#32713 初コミット。SVNrev567時点での、ファイルはbranch/140707(ReBuild XGVersion)から移行したもの。
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / directwrite / FontFace.h
1 /*
2 * Copyright (c) 2007-2010 SlimDX Group
3
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:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
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
20 * THE SOFTWARE.
21 */
22 #pragma once
23
24 extern const IID IID_IDWriteFontFace;
25
26 #include "../ComObject.h"
27 #include "../direct2d/Matrix3x2.h"
28 #include "../direct2d/SimplifiedGeometrySink.h"
29
30 #include "Enums.h"
31 #include "FontMetrics.h"
32 #include "GlyphMetrics.h"
33 #include "FontFile.h"
34 #include "GlyphOffset.h"
35 #include "RenderingParameters.h"
36 #include "FontTable.h"
37
38 namespace SlimDX
39 {
40         namespace DirectWrite
41         {
42                 public ref class FontFace : public ComObject
43                 {
44                         COMOBJECT(IDWriteFontFace, FontFace);
45
46                 public:
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();
52
53                         FontMetrics GetGdiCompatibleMetrics(float size, float pixelsPerDip);
54                         FontMetrics GetGdiCompatibleMetrics(float size, float pixelsPerDip, SlimDX::Direct2D::Matrix3x2 transform);
55
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);
58
59                         FontTable^ GetFontTable(int tableTag);
60                         FontTable^ GetFontTable(char a, char b, char c, char d);
61                         void ReleaseFontTable(FontTable^ table);
62
63                         property FontFaceType Type
64                         {
65                                 FontFaceType get();
66                         }
67
68                         property FontMetrics Metrics
69                         {
70                                 FontMetrics get();
71                         }
72
73                         property FontSimulations Simulations
74                         {
75                                 FontSimulations get();
76                         }
77
78                         property bool IsSymbolFont
79                         {
80                                 bool get();
81                         }
82
83                         property int GlyphCount
84                         {
85                                 int get();
86                         }
87
88                         property int Index
89                         {
90                                 int get();
91                         }
92                 };
93         }
94 }