[NUI] Add Font PreCache API to 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         /// This is used to pre-cache fonts in order to improve the runtime performance of the application.
70         /// </summary>
71         /// <param name="fallbackFamilyList">A list of fallback font families to be pre-cached.</param>
72         /// <param name="extraFamilyList">A list of additional font families to be pre-cached.</param>
73         /// <param name="localeFamily">A locale font family to be pre-cached.</param>
74         /// <param name="useThread">True if the font client should create thread and perform pre-caching, false otherwise.</param>
75         [EditorBrowsable(EditorBrowsableState.Never)]
76         public static void PreCache(List<string> fallbackFamilyList, List<string> extraFamilyList, string localeFamily, bool useThread)
77         {
78             int fallbackFamilySize = fallbackFamilyList?.Count ?? 0;
79             int extraFamilySize = extraFamilyList?.Count ?? 0;
80             string[] fallbackFamilyArray = fallbackFamilySize > 0 ? fallbackFamilyList.ToArray() : null;
81             string[] extraFamilyArray = extraFamilySize > 0 ? extraFamilyList.ToArray() : null;
82
83             Interop.FontClient.PreCache(fallbackFamilyArray, fallbackFamilySize, extraFamilyArray, extraFamilySize, localeFamily, useThread);
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85         }
86
87         /// <summary>
88         /// Called when the user changes the system defaults.
89         /// </summary>
90         /// <since_tizen> 5 </since_tizen>
91         public void ResetSystemDefaults()
92         {
93             Interop.FontClient.ResetSystemDefaults(SwigCPtr);
94             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95         }
96
97         /// <summary>
98         /// Retrieves the font point size of a given font id.
99         /// </summary>
100         /// <param name="id">The font identifier.</param>
101         /// <returns>The point size in 26.6 fractional points.</returns>
102         /// <since_tizen> 5 </since_tizen>
103         public uint GetPointSize(uint id)
104         {
105             uint ret = Interop.FontClient.GetPointSize(SwigCPtr, id);
106             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107             return ret;
108         }
109
110         /// <summary>
111         /// Whether the given character is supported by the font.
112         /// </summary>
113         /// <param name="fontId">The id of the font.</param>
114         /// <param name="character">The character in a font.</param>
115         /// <returns>True if the character is supported by the font.</returns>
116         /// <since_tizen> 5 </since_tizen>
117         public bool IsCharacterSupportedByFont(uint fontId, uint character)
118         {
119             bool ret = Interop.FontClient.IsCharacterSupportedByFont(SwigCPtr, fontId, character);
120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121             return ret;
122         }
123
124         /// <summary>
125         /// Finds the default font for displaying a UTF-32 character.
126         /// </summary>
127         /// <param name="charcode">The character for which a font is needed.</param>
128         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
129         /// <param name="preferColor">True if a color font is preferred.</param>
130         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
131         /// <since_tizen> 5 </since_tizen>
132         public uint FindDefaultFont(uint charcode, uint requestedPointSize, bool preferColor)
133         {
134             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode, requestedPointSize, preferColor);
135             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136             return ret;
137         }
138
139         /// <summary>
140         /// Find the default font for displaying a UTF-32 character.
141         /// </summary>
142         /// <param name="charcode">The character for which a font is needed.</param>
143         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
144         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
145         /// <since_tizen> 5 </since_tizen>
146         public uint FindDefaultFont(uint charcode, uint requestedPointSize)
147         {
148             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode, requestedPointSize);
149             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150             return ret;
151         }
152
153         /// <summary>
154         /// Find the default font for displaying a UTF-32 character.
155         /// </summary>
156         /// <param name="charcode">The character for which a font is needed.</param>
157         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
158         /// <since_tizen> 5 </since_tizen>
159         public uint FindDefaultFont(uint charcode)
160         {
161             uint ret = Interop.FontClient.FindDefaultFont(SwigCPtr, charcode);
162             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163             return ret;
164         }
165
166         /// <summary>
167         /// Retrieve the unique identifier for a font.
168         /// </summary>
169         /// <param name="path">The path to a font file.</param>
170         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
171         /// <param name="faceIndex">The index of the font face.</param>
172         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
173         /// <since_tizen> 5 </since_tizen>
174         public uint GetFontId(string path, uint requestedPointSize, uint faceIndex)
175         {
176             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path, requestedPointSize, faceIndex);
177             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178             return ret;
179         }
180
181         /// <summary>
182         /// Retrieve the unique identifier for a font.
183         /// </summary>
184         /// <param name="path">The path to a font file.</param>
185         /// <param name="requestedPointSize">The point size in 26.6 fractional points. The default point size is 12*64.</param>
186         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
187         /// <since_tizen> 5 </since_tizen>
188         public uint GetFontId(string path, uint requestedPointSize)
189         {
190             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path, requestedPointSize);
191             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192             return ret;
193         }
194
195         /// <summary>
196         /// Retrieve the unique identifier for a font.
197         /// </summary>
198         /// <param name="path">The path to a font file.</param>
199         /// <returns>A valid font identifier. Zero if the font does not exist.</returns>
200         /// <since_tizen> 5 </since_tizen>
201         public uint GetFontId(string path)
202         {
203             uint ret = Interop.FontClient.GetFontId(SwigCPtr, path);
204             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205             return ret;
206         }
207
208         /// <summary>
209         /// Check to see if a font is scalable.
210         /// </summary>
211         /// <param name="path">The path where the font file is located.</param>
212         /// <returns>True if scalable.</returns>
213         /// <since_tizen> 5 </since_tizen>
214         public bool IsScalable(string path)
215         {
216             bool ret = Interop.FontClient.IsScalable(SwigCPtr, path);
217             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218             return ret;
219         }
220
221         /// <summary>
222         /// Adds custom fonts directory.
223         /// </summary>
224         /// <param name="path">Path to the fonts directory.</param>
225         /// <returns>True if the fonts can be added.</returns>
226         /// <since_tizen> 5 </since_tizen>
227         public bool AddCustomFontDirectory(string path)
228         {
229             bool ret = Interop.FontClient.AddCustomFontDirectory(SwigCPtr, path);
230             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231             return ret;
232         }
233
234         /// <summary>
235         /// Retrieve the list of font info supported by the system.
236         /// </summary>
237         /// <returns>The list of FontInfo</returns>
238         /// <remarks>
239         /// <see cref="Tizen.NUI.Text.FontInfo"/>
240         /// </remarks>
241         /// <example>
242         /// The following example demonstrates how to use the GetSystemFonts method.
243         /// <code>
244         /// var fontList = FontClient.Instance.GetSystemFonts();
245         /// foreach(Tizen.NUI.Text.FontInfo fontInfo in fontList)
246         /// {
247         ///    string fontFamily = fontInfo.Family;
248         ///    string fontPath = fontInfo.Path;
249         ///    FontWidthType fontWidth = fontInfo.Style.Width;
250         ///    FontWeightType fontWeight = fontInfo.Style.Weight;
251         ///    FontSlantType fontSlant = fontInfo.Style.Slant;
252         /// }
253         /// </code>
254         /// </example>
255         [EditorBrowsable(EditorBrowsableState.Never)]
256         public List<FontInfo> GetSystemFonts()
257         {
258             using PropertyArray fontArray = new PropertyArray(Interop.FontClient.GetSystemFonts(SwigCPtr), true);
259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260
261             List<FontInfo> fontInfoList;
262             fontInfoList = TextUtils.GetFontInfoList(fontArray);
263             return fontInfoList;
264         }
265
266         internal static FontClient Get()
267         {
268             FontClient ret = new FontClient(Interop.FontClient.Get(), true);
269             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
270             return ret;
271         }
272
273         internal FontClient Assign(FontClient handle)
274         {
275             FontClient ret = new FontClient(Interop.FontClient.Assign(SwigCPtr, FontClient.getCPtr(handle)), false);
276             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277             return ret;
278         }
279
280         internal void SetDpi(uint horizontalDpi, uint verticalDpi)
281         {
282             Interop.FontClient.SetDpi(SwigCPtr, horizontalDpi, verticalDpi);
283             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284         }
285
286         internal void GetDpi(SWIGTYPE_p_unsigned_int horizontalDpi, SWIGTYPE_p_unsigned_int verticalDpi)
287         {
288             Interop.FontClient.GetDpi(SwigCPtr, SWIGTYPE_p_unsigned_int.getCPtr(horizontalDpi), SWIGTYPE_p_unsigned_int.getCPtr(verticalDpi));
289             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290         }
291
292         internal int GetDefaultFontSize()
293         {
294             int ret = Interop.FontClient.GetDefaultFontSize(SwigCPtr);
295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296             return ret;
297         }
298
299         internal void GetDefaultFonts(SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t defaultFonts)
300         {
301             Interop.FontClient.GetDefaultFonts(SwigCPtr, SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.getCPtr(defaultFonts));
302             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
303         }
304
305         internal void GetDefaultPlatformFontDescription(FontDescription fontDescription)
306         {
307             Interop.FontClient.GetDefaultPlatformFontDescription(SwigCPtr, FontDescription.getCPtr(fontDescription));
308             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309         }
310
311         internal void GetDescription(uint id, FontDescription fontDescription)
312         {
313             Interop.FontClient.GetDescription(SwigCPtr, id, FontDescription.getCPtr(fontDescription));
314             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
315         }
316
317         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize, bool preferColor)
318         {
319             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, preferColor);
320             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321             return ret;
322         }
323
324         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize)
325         {
326             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
327             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328             return ret;
329         }
330
331         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription)
332         {
333             uint ret = Interop.FontClient.FindFallbackFont(SwigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription));
334             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335             return ret;
336         }
337
338         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize, uint faceIndex)
339         {
340             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, faceIndex);
341             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342             return ret;
343         }
344
345         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize)
346         {
347             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
348             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349             return ret;
350         }
351
352         internal uint GetFontId(FontDescription preferredFontDescription)
353         {
354             uint ret = Interop.FontClient.GetFontId(SwigCPtr, FontDescription.getCPtr(preferredFontDescription));
355             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356             return ret;
357         }
358
359         internal bool IsScalable(FontDescription fontDescription)
360         {
361             bool ret = Interop.FontClient.IsScalable(SwigCPtr, FontDescription.getCPtr(fontDescription));
362             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363             return ret;
364         }
365
366         internal void GetFixedSizes(string path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
367         {
368             Interop.FontClient.GetFixedSizes(SwigCPtr, path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
369             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370         }
371
372         internal void GetFixedSizes(FontDescription fontDescription, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
373         {
374             Interop.FontClient.GetFixedSizes(SwigCPtr, FontDescription.getCPtr(fontDescription), SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
375             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376         }
377
378         internal void GetFontMetrics(uint fontId, FontMetrics metrics)
379         {
380             Interop.FontClient.GetFontMetrics(SwigCPtr, fontId, FontMetrics.getCPtr(metrics));
381             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382         }
383
384         internal uint GetGlyphIndex(uint fontId, uint charcode)
385         {
386             uint ret = Interop.FontClient.GetGlyphIndex(SwigCPtr, fontId, charcode);
387             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388             return ret;
389         }
390
391         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type, bool horizontal)
392         {
393             bool ret = Interop.FontClient.GetGlyphMetrics(SwigCPtr, GlyphInfo.getCPtr(array), size, (int)type, horizontal);
394             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395             return ret;
396         }
397
398         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type)
399         {
400             bool ret = Interop.FontClient.GetGlyphMetrics(SwigCPtr, GlyphInfo.getCPtr(array), size, (int)type);
401             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402             return ret;
403         }
404
405         internal void CreateBitmap(uint fontId, uint glyphIndex, bool softwareItalic, bool softwareBold, FontClient.GlyphBufferData data, int outlineWidth)
406         {
407             Interop.FontClient.CreateBitmap(SwigCPtr, fontId, glyphIndex, softwareItalic, softwareBold, FontClient.GlyphBufferData.getCPtr(data), outlineWidth);
408             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409         }
410
411         internal PixelData CreateBitmap(uint fontId, uint glyphIndex, int outlineWidth)
412         {
413             PixelData ret = new PixelData(Interop.FontClient.CreateBitmap(SwigCPtr, fontId, glyphIndex, outlineWidth), true);
414             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415             return ret;
416         }
417
418         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)
419         {
420             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));
421             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422         }
423
424         internal GlyphInfo GetEllipsisGlyph(uint requestedPointSize)
425         {
426             GlyphInfo ret = new GlyphInfo(Interop.FontClient.GetEllipsisGlyph(SwigCPtr, requestedPointSize), false);
427             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428             return ret;
429         }
430
431         internal bool IsColorGlyph(uint fontId, uint glyphIndex)
432         {
433             bool ret = Interop.FontClient.IsColorGlyph(SwigCPtr, fontId, glyphIndex);
434             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
435             return ret;
436         }
437
438         internal class GlyphBufferData : Disposable
439         {
440             public GlyphBufferData() : this(Interop.FontClient.NewFontClientGlyphBufferData(), true)
441             {
442                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
443             }
444
445             internal GlyphBufferData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
446             {
447             }
448
449             /*public byte[] Buffer
450             {
451                 set
452                 {
453                     Interop.FontClient.GlyphBufferDataBufferSet(swigCPtr, value);
454                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455                 }
456                 get
457                 {
458                     global::System.IntPtr cPtr = Interop.FontClient.GlyphBufferDataBufferGet(swigCPtr);
459                     SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
460                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
461                     return ret;
462                 }
463             }*/
464
465             public uint Width
466             {
467                 set
468                 {
469                     Interop.FontClient.GlyphBufferDataWidthSet(SwigCPtr, value);
470                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
471                 }
472                 get
473                 {
474                     uint ret = Interop.FontClient.GlyphBufferDataWidthGet(SwigCPtr);
475                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
476                     return ret;
477                 }
478             }
479
480             public uint Height
481             {
482                 set
483                 {
484                     Interop.FontClient.GlyphBufferDataHeightSet(SwigCPtr, value);
485                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
486                 }
487                 get
488                 {
489                     uint ret = Interop.FontClient.GlyphBufferDataHeightGet(SwigCPtr);
490                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
491                     return ret;
492                 }
493             }
494
495             public PixelFormat Format
496             {
497                 set
498                 {
499                     Interop.FontClient.GlyphBufferDataFormatSet(SwigCPtr, (int)value);
500                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501                 }
502                 get
503                 {
504                     PixelFormat ret = (PixelFormat)Interop.FontClient.GlyphBufferDataFormatGet(SwigCPtr);
505                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
506                     return ret;
507                 }
508             }
509
510             /// This will not be public opened.
511             [EditorBrowsable(EditorBrowsableState.Never)]
512             protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
513             {
514                 Interop.FontClient.DeleteFontClientGlyphBufferData(swigCPtr);
515             }
516         }
517     }
518 }