[NUI] Add GetSystemFonts in FontClient
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Utility / FontClient.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System.ComponentModel;
18 using System.Collections.Generic;
19 using Tizen.NUI.BaseComponents;
20 using Tizen.NUI.Text;
21
22 namespace Tizen.NUI
23 {
24     /// <summary>
25     /// FontClient provides access to font information and resources.
26     /// </summary>
27     /// <since_tizen> 5 </since_tizen>
28     public class FontClient : BaseHandle
29     {
30         private static readonly FontClient instance = FontClient.Get();
31
32         internal FontClient(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
33         {
34         }
35
36         internal FontClient() : this(Interop.FontClient.NewFontClient(), true)
37         {
38             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39         }
40
41         internal FontClient(FontClient handle) : this(Interop.FontClient.NewFontClient(FontClient.getCPtr(handle)), true)
42         {
43             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44         }
45
46         internal static uint DefaultPointSize
47         {
48             get
49             {
50                 uint ret = Interop.FontClient.DefaultPointSizeGet();
51                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52                 return ret;
53             }
54         }
55
56         /// <summary>
57         /// Gets the singleton pattern of the FontClient object.
58         /// </summary>
59         /// <since_tizen> 5 </since_tizen>
60         public static FontClient Instance
61         {
62             get
63             {
64                 return instance;
65             }
66         }
67
68         /// <summary>
69         /// Called when the user changes the system defaults.
70         /// </summary>
71         /// <since_tizen> 5 </since_tizen>
72         public void ResetSystemDefaults()
73         {
74             Interop.FontClient.ResetSystemDefaults(SwigCPtr);
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76         }
77
78         /// <summary>
79         /// Retrieves the font point size of a given font id.
80         /// </summary>
81         /// <param name="id">The font identifier.</param>
82         /// <returns>The point size in 26.6 fractional points.</returns>
83         /// <since_tizen> 5 </since_tizen>
84         public uint GetPointSize(uint id)
85         {
86             uint ret = Interop.FontClient.GetPointSize(SwigCPtr, id);
87             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88             return ret;
89         }
90
91         /// <summary>
92         /// Whether the given character is supported by the font.
93         /// </summary>
94         /// <param name="fontId">The id of the font.</param>
95         /// <param name="character">The character in a font.</param>
96         /// <returns>True if the character is supported by the font.</returns>
97         /// <since_tizen> 5 </since_tizen>
98         public bool IsCharacterSupportedByFont(uint fontId, uint character)
99         {
100             bool ret = Interop.FontClient.IsCharacterSupportedByFont(SwigCPtr, fontId, character);
101             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102             return ret;
103         }
104
105         /// <summary>
106         /// Finds the default font for displaying a UTF-32 character.
107         /// </summary>
108         /// <param name="charcode">The character for which a font is needed.</param>
109         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
110         /// <param name="preferColor">True if a color font is preferred.</param>
111         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
112         /// <since_tizen> 5 </since_tizen>
113         public uint FindDefaultFont(uint charcode, uint requestedPointSize, bool preferColor)
114         {
115             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode, requestedPointSize, preferColor);
116             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117             return ret;
118         }
119
120         /// <summary>
121         /// Find the default font for displaying a UTF-32 character.
122         /// </summary>
123         /// <param name="charcode">The character for which a font is needed.</param>
124         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
125         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
126         /// <since_tizen> 5 </since_tizen>
127         public uint FindDefaultFont(uint charcode, uint requestedPointSize)
128         {
129             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode, requestedPointSize);
130             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131             return ret;
132         }
133
134         /// <summary>
135         /// Find the default font for displaying a UTF-32 character.
136         /// </summary>
137         /// <param name="charcode">The character for which a font is needed.</param>
138         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
139         /// <since_tizen> 5 </since_tizen>
140         public uint FindDefaultFont(uint charcode)
141         {
142             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode);
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144             return ret;
145         }
146
147         /// <summary>
148         /// Retrieve the unique identifier for a font.
149         /// </summary>
150         /// <param name="path">The path to a font file.</param>
151         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
152         /// <param name="faceIndex">The index of the font face.</param>
153         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
154         /// <since_tizen> 5 </since_tizen>
155         public uint GetFontId(string path, uint requestedPointSize, uint faceIndex)
156         {
157             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path, requestedPointSize, faceIndex);
158             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159             return ret;
160         }
161
162         /// <summary>
163         /// Retrieve the unique identifier for a font.
164         /// </summary>
165         /// <param name="path">The path to a font file.</param>
166         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
167         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
168         /// <since_tizen> 5 </since_tizen>
169         public uint GetFontId(string path, uint requestedPointSize)
170         {
171             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path, requestedPointSize);
172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173             return ret;
174         }
175
176         /// <summary>
177         /// Retrieve the unique identifier for a font.
178         /// </summary>
179         /// <param name="path">The path to a font file.</param>
180         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
181         /// <since_tizen> 5 </since_tizen>
182         public uint GetFontId(string path)
183         {
184             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path);
185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186             return ret;
187         }
188
189         /// <summary>
190         /// Check to see if a font is scalable.
191         /// </summary>
192         /// <param name="path">The path where the font file is located.</param>
193         /// <returns>True if scalable.</returns>
194         /// <since_tizen> 5 </since_tizen>
195         public bool IsScalable(string path)
196         {
197             bool ret = Interop.FontClient.IsScalable(SwigCPtr, path);
198             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199             return ret;
200         }
201
202         /// <summary>
203         /// Adds custom fonts directory.
204         /// </summary>
205         /// <param name="path">Path to the fonts directory.</param>
206         /// <returns>True if the fonts can be added.</returns>
207         /// <since_tizen> 5 </since_tizen>
208         public bool AddCustomFontDirectory(string path)
209         {
210             bool ret = Interop.FontClient.AddCustomFontDirectory(SwigCPtr, path);
211             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212             return ret;
213         }
214
215         /// <summary>
216         /// Retrieve the list of font info supported by the system.
217         /// </summary>
218         /// <returns>The list of FontInfo</returns>
219         /// <remarks>
220         /// <see cref="Tizen.NUI.Text.FontInfo"/>
221         /// </remarks>
222         /// <example>
223         /// The following example demonstrates how to use the GetSystemFonts method.
224         /// <code>
225         /// var fontList = FontClient.Instance.GetSystemFonts();
226         /// foreach(Tizen.NUI.Text.FontInfo fontInfo in fontList)
227         /// {
228         ///    string fontFamily = fontInfo.Family;
229         ///    string fontPath = fontInfo.Path;
230         ///    FontWidthType fontWidth = fontInfo.Style.Width;
231         ///    FontWeightType fontWeight = fontInfo.Style.Weight;
232         ///    FontSlantType fontSlant = fontInfo.Style.Slant;
233         /// }
234         /// </code>
235         /// </example>
236         [EditorBrowsable(EditorBrowsableState.Never)]
237         public List<FontInfo> GetSystemFonts()
238         {
239             using PropertyArray fontArray = new PropertyArray(Interop.FontClient.GetSystemFonts(SwigCPtr), true);
240             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241
242             List<FontInfo> fontInfoList;
243             fontInfoList = TextUtils.GetFontInfoList(fontArray);
244             return fontInfoList;
245         }
246
247         internal static FontClient Get()
248         {
249             FontClient ret = new FontClient(Interop.FontClient.Get(), true);
250             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251             return ret;
252         }
253
254         internal FontClient Assign(FontClient handle)
255         {
256             FontClient ret = new FontClient(Interop.FontClient.Assign(SwigCPtr, FontClient.getCPtr(handle)), false);
257             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
258             return ret;
259         }
260
261         internal void SetDpi(uint horizontalDpi, uint verticalDpi)
262         {
263             Interop.FontClient.SetDpi(SwigCPtr, horizontalDpi, verticalDpi);
264             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265         }
266
267         internal void GetDpi(SWIGTYPE_p_unsigned_int horizontalDpi, SWIGTYPE_p_unsigned_int verticalDpi)
268         {
269             Interop.FontClient.GetDpi(SwigCPtr, SWIGTYPE_p_unsigned_int.getCPtr(horizontalDpi), SWIGTYPE_p_unsigned_int.getCPtr(verticalDpi));
270             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271         }
272
273         internal int GetDefaultFontSize()
274         {
275             int ret = Interop.FontClient.GetDefaultFontSize(SwigCPtr);
276             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277             return ret;
278         }
279
280         internal void GetDefaultFonts(SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t defaultFonts)
281         {
282             Interop.FontClient.GetDefaultFonts(SwigCPtr, SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.getCPtr(defaultFonts));
283             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284         }
285
286         internal void GetDefaultPlatformFontDescription(FontDescription fontDescription)
287         {
288             Interop.FontClient.GetDefaultPlatformFontDescription(SwigCPtr, FontDescription.getCPtr(fontDescription));
289             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290         }
291
292         internal void GetDescription(uint id, FontDescription fontDescription)
293         {
294             Interop.FontClient.GetDescription(SwigCPtr, id, FontDescription.getCPtr(fontDescription));
295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296         }
297
298         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize, bool preferColor)
299         {
300             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, preferColor);
301             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302             return ret;
303         }
304
305         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize)
306         {
307             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
308             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309             return ret;
310         }
311
312         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription)
313         {
314             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription));
315             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316             return ret;
317         }
318
319         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize, uint faceIndex)
320         {
321             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, faceIndex);
322             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323             return ret;
324         }
325
326         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize)
327         {
328             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
329             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330             return ret;
331         }
332
333         internal uint GetFontId(FontDescription preferredFontDescription)
334         {
335             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription));
336             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337             return ret;
338         }
339
340         internal bool IsScalable(FontDescription fontDescription)
341         {
342             bool ret = Interop.FontClient.IsScalable(SwigCPtr, FontDescription.getCPtr(fontDescription));
343             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344             return ret;
345         }
346
347         internal void GetFixedSizes(string path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
348         {
349             Interop.FontClient.GetFixedSizes(SwigCPtr, path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
350             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351         }
352
353         internal void GetFixedSizes(FontDescription fontDescription, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
354         {
355             Interop.FontClient.GetFixedSizes(SwigCPtr, FontDescription.getCPtr(fontDescription), SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
356             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357         }
358
359         internal void GetFontMetrics(uint fontId, FontMetrics metrics)
360         {
361             Interop.FontClient.GetFontMetrics(SwigCPtr, fontId, FontMetrics.getCPtr(metrics));
362             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363         }
364
365         internal uint GetGlyphIndex(uint fontId, uint charcode)
366         {
367             uint ret = Interop.FontClient.GetGlyphIndex(SwigCPtr, fontId, charcode);
368             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369             return ret;
370         }
371
372         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type, bool horizontal)
373         {
374             bool ret = Interop.FontClient.GetGlyphMetrics(SwigCPtr, GlyphInfo.getCPtr(array), size, (int)type, horizontal);
375             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376             return ret;
377         }
378
379         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type)
380         {
381             bool ret = Interop.FontClient.GetGlyphMetrics(SwigCPtr, GlyphInfo.getCPtr(array), size, (int)type);
382             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
383             return ret;
384         }
385
386         internal void CreateBitmap(uint fontId, uint glyphIndex, bool softwareItalic, bool softwareBold, FontClient.GlyphBufferData data, int outlineWidth)
387         {
388             Interop.FontClient.CreateBitmap(SwigCPtr, fontId, glyphIndex, softwareItalic, softwareBold, FontClient.GlyphBufferData.getCPtr(data), outlineWidth);
389             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
390         }
391
392         internal PixelData CreateBitmap(uint fontId, uint glyphIndex, int outlineWidth)
393         {
394             PixelData ret = new PixelData(Interop.FontClient.CreateBitmap(SwigCPtr, fontId, glyphIndex, outlineWidth), true);
395             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396             return ret;
397         }
398
399         internal void CreateVectorBlob(uint fontId, uint glyphIndex, SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob blob, SWIGTYPE_p_unsigned_int blobLength, SWIGTYPE_p_unsigned_int nominalWidth, SWIGTYPE_p_unsigned_int nominalHeight)
400         {
401             Interop.FontClient.CreateVectorBlob(SwigCPtr, fontId, glyphIndex, SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob.getCPtr(blob), SWIGTYPE_p_unsigned_int.getCPtr(blobLength), SWIGTYPE_p_unsigned_int.getCPtr(nominalWidth), SWIGTYPE_p_unsigned_int.getCPtr(nominalHeight));
402             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
403         }
404
405         internal GlyphInfo GetEllipsisGlyph(uint requestedPointSize)
406         {
407             GlyphInfo ret = new GlyphInfo(Interop.FontClient.GetEllipsisGlyph(SwigCPtr, requestedPointSize), false);
408             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409             return ret;
410         }
411
412         internal bool IsColorGlyph(uint fontId, uint glyphIndex)
413         {
414             bool ret = Interop.FontClient.IsColorGlyph(SwigCPtr, fontId, glyphIndex);
415             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
416             return ret;
417         }
418
419         internal class GlyphBufferData : Disposable
420         {
421             public GlyphBufferData() : this(Interop.FontClient.NewFontClientGlyphBufferData(), true)
422             {
423                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
424             }
425
426             internal GlyphBufferData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
427             {
428             }
429
430             /*public byte[] Buffer
431             {
432                 set
433                 {
434                     Interop.FontClient.GlyphBufferDataBufferSet(swigCPtr, value);
435                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436                 }
437                 get
438                 {
439                     global::System.IntPtr cPtr = Interop.FontClient.GlyphBufferDataBufferGet(swigCPtr);
440                     SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
441                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
442                     return ret;
443                 }
444             }*/
445
446             public uint Width
447             {
448                 set
449                 {
450                     Interop.FontClient.GlyphBufferDataWidthSet(SwigCPtr, value);
451                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452                 }
453                 get
454                 {
455                     uint ret = Interop.FontClient.GlyphBufferDataWidthGet(SwigCPtr);
456                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
457                     return ret;
458                 }
459             }
460
461             public uint Height
462             {
463                 set
464                 {
465                     Interop.FontClient.GlyphBufferDataHeightSet(SwigCPtr, value);
466                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
467                 }
468                 get
469                 {
470                     uint ret = Interop.FontClient.GlyphBufferDataHeightGet(SwigCPtr);
471                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472                     return ret;
473                 }
474             }
475
476             public PixelFormat Format
477             {
478                 set
479                 {
480                     Interop.FontClient.GlyphBufferDataFormatSet(SwigCPtr, (int)value);
481                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482                 }
483                 get
484                 {
485                     PixelFormat ret = (PixelFormat)Interop.FontClient.GlyphBufferDataFormatGet(SwigCPtr);
486                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
487                     return ret;
488                 }
489             }
490
491             /// This will not be public opened.
492             [EditorBrowsable(EditorBrowsableState.Never)]
493             protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
494             {
495                 Interop.FontClient.DeleteFontClientGlyphBufferData(swigCPtr);
496             }
497         }
498     }
499 }