Add ScriptUI to support XAML file (#320)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / FontClient.cs
1 /*
2  * Copyright(c) 2017 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 namespace Tizen.NUI
18 {
19     /// <summary>
20     /// FontClient provides access to font information and resources.
21     /// </summary>
22     /// <since_tizen> 5 </since_tizen>
23     public class FontClient : BaseHandle
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26
27         internal FontClient(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.FontClient_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FontClient obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         internal static uint DefaultPointSize
38         {
39             get
40             {
41                 uint ret = NDalicManualPINVOKE.FontClient_DEFAULT_POINT_SIZE_get();
42                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
43                 return ret;
44             }
45         }
46
47         internal class GlyphBufferData : global::System.IDisposable
48         {
49             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
50             protected bool swigCMemOwn;
51
52             internal GlyphBufferData(global::System.IntPtr cPtr, bool cMemoryOwn)
53             {
54                 swigCMemOwn = cMemoryOwn;
55                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
56             }
57
58             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GlyphBufferData obj)
59             {
60                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
61             }
62
63             //A Flag to check who called Dispose(). (By User or DisposeQueue)
64             private bool isDisposeQueued = false;
65             /// <summary>
66             /// A Flat to check if it is already disposed.
67             /// </summary>
68             protected bool disposed = false;
69
70             ~GlyphBufferData()
71             {
72                 if (!isDisposeQueued)
73                 {
74                     isDisposeQueued = true;
75                     DisposeQueue.Instance.Add(this);
76                 }
77             }
78
79             public void Dispose()
80             {
81                 //Throw excpetion if Dispose() is called in separate thread.
82                 if (!Window.IsInstalled())
83                 {
84                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
85                 }
86
87                 if (isDisposeQueued)
88                 {
89                     Dispose(DisposeTypes.Implicit);
90                 }
91                 else
92                 {
93                     Dispose(DisposeTypes.Explicit);
94                     System.GC.SuppressFinalize(this);
95                 }
96             }
97
98             protected virtual void Dispose(DisposeTypes type)
99             {
100                 if (disposed)
101                 {
102                     return;
103                 }
104
105                 if (type == DisposeTypes.Explicit)
106                 {
107                     //Called by User
108                     //Release your own managed resources here.
109                     //You should release all of your own disposable objects here.
110                 }
111
112                 //Release your own unmanaged resources here.
113                 //You should not access any managed member here except static instance.
114                 //because the execution order of Finalizes is non-deterministic.
115
116                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
117                 {
118                     if (swigCMemOwn)
119                     {
120                         swigCMemOwn = false;
121                         NDalicManualPINVOKE.delete_FontClient_GlyphBufferData(swigCPtr);
122                     }
123                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
124                 }
125                 disposed = true;
126             }
127
128             public GlyphBufferData() : this(NDalicManualPINVOKE.new_FontClient_GlyphBufferData(), true)
129             {
130                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131             }
132
133             /*public byte[] Buffer
134             {
135                 set
136                 {
137                     NDalicManualPINVOKE.FontClient_GlyphBufferData_buffer_set(swigCPtr, value);
138                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139                 }
140                 get
141                 {
142                     global::System.IntPtr cPtr = NDalicManualPINVOKE.FontClient_GlyphBufferData_buffer_get(swigCPtr);
143                     SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
144                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145                     return ret;
146                 }
147             }*/
148
149             public uint Width
150             {
151                 set
152                 {
153                     NDalicManualPINVOKE.FontClient_GlyphBufferData_width_set(swigCPtr, value);
154                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155                 }
156                 get
157                 {
158                     uint ret = NDalicManualPINVOKE.FontClient_GlyphBufferData_width_get(swigCPtr);
159                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160                     return ret;
161                 }
162             }
163
164             public uint Height
165             {
166                 set
167                 {
168                     NDalicManualPINVOKE.FontClient_GlyphBufferData_height_set(swigCPtr, value);
169                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170                 }
171                 get
172                 {
173                     uint ret = NDalicManualPINVOKE.FontClient_GlyphBufferData_height_get(swigCPtr);
174                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175                     return ret;
176                 }
177             }
178
179             public PixelFormat Format
180             {
181                 set
182                 {
183                     NDalicManualPINVOKE.FontClient_GlyphBufferData_format_set(swigCPtr, (int)value);
184                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185                 }
186                 get
187                 {
188                     PixelFormat ret = (PixelFormat)NDalicManualPINVOKE.FontClient_GlyphBufferData_format_get(swigCPtr);
189                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190                     return ret;
191                 }
192             }
193
194         }
195         private static readonly FontClient instance = FontClient.Get();
196
197         /// <summary>
198         /// Gets the singleton of the FontClient object.
199         /// </summary>
200         /// <since_tizen> 5 </since_tizen>
201         public static FontClient Instance
202         {
203             get
204             {
205                 return instance;
206             }
207         }
208
209         internal static FontClient Get()
210         {
211             FontClient ret = new FontClient(NDalicManualPINVOKE.FontClient_Get(), true);
212             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213             return ret;
214         }
215
216         internal FontClient() : this(NDalicManualPINVOKE.new_FontClient__SWIG_0(), true)
217         {
218             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219         }
220
221         internal FontClient(FontClient handle) : this(NDalicManualPINVOKE.new_FontClient__SWIG_1(FontClient.getCPtr(handle)), true)
222         {
223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224         }
225
226         internal FontClient Assign(FontClient handle)
227         {
228             FontClient ret = new FontClient(NDalicManualPINVOKE.FontClient_Assign(swigCPtr, FontClient.getCPtr(handle)), false);
229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230             return ret;
231         }
232
233         internal void SetDpi(uint horizontalDpi, uint verticalDpi)
234         {
235             NDalicManualPINVOKE.FontClient_SetDpi(swigCPtr, horizontalDpi, verticalDpi);
236             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237         }
238
239         internal void GetDpi(SWIGTYPE_p_unsigned_int horizontalDpi, SWIGTYPE_p_unsigned_int verticalDpi)
240         {
241             NDalicManualPINVOKE.FontClient_GetDpi(swigCPtr, SWIGTYPE_p_unsigned_int.getCPtr(horizontalDpi), SWIGTYPE_p_unsigned_int.getCPtr(verticalDpi));
242             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243         }
244
245         internal int GetDefaultFontSize()
246         {
247             int ret = NDalicManualPINVOKE.FontClient_GetDefaultFontSize(swigCPtr);
248             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249             return ret;
250         }
251
252         /// <summary>
253         /// Called when the user changes the system defaults.
254         /// </summary>
255         /// <since_tizen> 5 </since_tizen>
256         public void ResetSystemDefaults()
257         {
258             NDalicManualPINVOKE.FontClient_ResetSystemDefaults(swigCPtr);
259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260         }
261
262         internal void GetDefaultFonts(SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t defaultFonts)
263         {
264             NDalicManualPINVOKE.FontClient_GetDefaultFonts(swigCPtr, SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.getCPtr(defaultFonts));
265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266         }
267
268         internal void GetDefaultPlatformFontDescription(FontDescription fontDescription)
269         {
270             NDalicManualPINVOKE.FontClient_GetDefaultPlatformFontDescription(swigCPtr, FontDescription.getCPtr(fontDescription));
271             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272         }
273
274         internal void GetSystemFonts(SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t systemFonts)
275         {
276             NDalicManualPINVOKE.FontClient_GetSystemFonts(swigCPtr, SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.getCPtr(systemFonts));
277             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278         }
279
280         internal void GetDescription(uint id, FontDescription fontDescription)
281         {
282             NDalicManualPINVOKE.FontClient_GetDescription(swigCPtr, id, FontDescription.getCPtr(fontDescription));
283             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284         }
285
286         /// <summary>
287         /// Retrieves the font point size of a given font id.
288         /// </summary>
289         /// <param name="id">The font identifier.</param>
290         /// <returns>The point size in 26.6 fractional points.</returns>
291         /// <since_tizen> 5 </since_tizen>
292         public uint GetPointSize(uint id)
293         {
294             uint ret = NDalicManualPINVOKE.FontClient_GetPointSize(swigCPtr, id);
295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296             return ret;
297         }
298
299         /// <summary>
300         /// Whether the given character is supported by the font.
301         /// </summary>
302         /// <param name="fontId">The id of the font.</param>
303         /// <param name="character">The character.</param>
304         /// <returns>True if the character is supported by the font.</returns>
305         /// <since_tizen> 5 </since_tizen>
306         public bool IsCharacterSupportedByFont(uint fontId, uint character)
307         {
308             bool ret = NDalicManualPINVOKE.FontClient_IsCharacterSupportedByFont(swigCPtr, fontId, character);
309             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310             return ret;
311         }
312
313         /// <summary>
314         /// Find the default font for displaying a UTF-32 character.
315         /// </summary>
316         /// <param name="charcode">The character for which a font is needed.</param>
317         /// <param name="requestedPointSize">The point size in 26.6 fractional points; the default point size is 12*64.</param>
318         /// <param name="preferColor">True if a color font is preferred.</param>
319         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
320         /// <since_tizen> 5 </since_tizen>
321         public uint FindDefaultFont(uint charcode, uint requestedPointSize, bool preferColor)
322         {
323             uint ret = NDalicManualPINVOKE.FontClient_FindDefaultFont__SWIG_0(swigCPtr, charcode, requestedPointSize, preferColor);
324             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325             return ret;
326         }
327
328         /// <summary>
329         /// Find the default font for displaying a UTF-32 character.
330         /// </summary>
331         /// <param name="charcode">The character for which a font is needed.</param>
332         /// <param name="requestedPointSize">The point size in 26.6 fractional points; the default point size is 12*64.</param>
333         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
334         /// <since_tizen> 5 </since_tizen>
335         public uint FindDefaultFont(uint charcode, uint requestedPointSize)
336         {
337             uint ret = NDalicManualPINVOKE.FontClient_FindDefaultFont__SWIG_1(swigCPtr, charcode, requestedPointSize);
338             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339             return ret;
340         }
341
342         /// <summary>
343         /// Find the default font for displaying a UTF-32 character.
344         /// </summary>
345         /// <param name="charcode">The character for which a font is needed.</param>
346         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
347         /// <since_tizen> 5 </since_tizen>
348         public uint FindDefaultFont(uint charcode)
349         {
350             uint ret = NDalicManualPINVOKE.FontClient_FindDefaultFont__SWIG_2(swigCPtr, charcode);
351             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
352             return ret;
353         }
354
355         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize, bool preferColor)
356         {
357             uint ret = NDalicManualPINVOKE.FontClient_FindFallbackFont__SWIG_0(swigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, preferColor);
358             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359             return ret;
360         }
361
362         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription, uint requestedPointSize)
363         {
364             uint ret = NDalicManualPINVOKE.FontClient_FindFallbackFont__SWIG_1(swigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
365             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366             return ret;
367         }
368
369         internal uint FindFallbackFont(uint charcode, FontDescription preferredFontDescription)
370         {
371             uint ret = NDalicManualPINVOKE.FontClient_FindFallbackFont__SWIG_2(swigCPtr, charcode, FontDescription.getCPtr(preferredFontDescription));
372             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373             return ret;
374         }
375
376         /// <summary>
377         /// Retrieve the unique identifier for a font..
378         /// </summary>
379         /// <param name="path">The path to a font file.</param>
380         /// <param name="requestedPointSize">The point size in 26.6 fractional points; the default point size is 12*64.</param>
381         /// <param name="faceIndex">The index of the font face.</param>
382         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
383         /// <since_tizen> 5 </since_tizen>
384         public uint GetFontId(string path, uint requestedPointSize, uint faceIndex)
385         {
386             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_0(swigCPtr, path, requestedPointSize, faceIndex);
387             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388             return ret;
389         }
390
391         /// <summary>
392         /// Retrieve the unique identifier for a font..
393         /// </summary>
394         /// <param name="path">The path to a font file.</param>
395         /// <param name="requestedPointSize">The point size in 26.6 fractional points; the default point size is 12*64.</param>
396         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
397         /// <since_tizen> 5 </since_tizen>
398         public uint GetFontId(string path, uint requestedPointSize)
399         {
400             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_1(swigCPtr, path, requestedPointSize);
401             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402             return ret;
403         }
404
405         /// <summary>
406         /// Retrieve the unique identifier for a font..
407         /// </summary>
408         /// <param name="path">The path to a font file.</param>
409         /// <returns>A valid font identifier, or zero if the font does not exist.</returns>
410         /// <since_tizen> 5 </since_tizen>
411         public uint GetFontId(string path)
412         {
413             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_2(swigCPtr, path);
414             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415             return ret;
416         }
417
418         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize, uint faceIndex)
419         {
420             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_3(swigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize, faceIndex);
421             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422             return ret;
423         }
424
425         internal uint GetFontId(FontDescription preferredFontDescription, uint requestedPointSize)
426         {
427             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_4(swigCPtr, FontDescription.getCPtr(preferredFontDescription), requestedPointSize);
428             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429             return ret;
430         }
431
432         internal uint GetFontId(FontDescription preferredFontDescription)
433         {
434             uint ret = NDalicManualPINVOKE.FontClient_GetFontId__SWIG_5(swigCPtr, FontDescription.getCPtr(preferredFontDescription));
435             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436             return ret;
437         }
438
439         /// <summary>
440         /// Check to see if a font is scalable.
441         /// </summary>
442         /// <param name="path">Path The path to a font file.</param>
443         /// <returns>True if scalable.</returns>
444         /// <since_tizen> 5 </since_tizen>
445         public bool IsScalable(string path)
446         {
447             bool ret = NDalicManualPINVOKE.FontClient_IsScalable__SWIG_0(swigCPtr, path);
448             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449             return ret;
450         }
451
452         internal bool IsScalable(FontDescription fontDescription)
453         {
454             bool ret = NDalicManualPINVOKE.FontClient_IsScalable__SWIG_1(swigCPtr, FontDescription.getCPtr(fontDescription));
455             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
456             return ret;
457         }
458
459         internal void GetFixedSizes(string path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
460         {
461             NDalicManualPINVOKE.FontClient_GetFixedSizes__SWIG_0(swigCPtr, path, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
462             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
463         }
464
465         internal void GetFixedSizes(FontDescription fontDescription, SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t sizes)
466         {
467             NDalicManualPINVOKE.FontClient_GetFixedSizes__SWIG_1(swigCPtr, FontDescription.getCPtr(fontDescription), SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.getCPtr(sizes));
468             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
469         }
470
471         internal void GetFontMetrics(uint fontId, FontMetrics metrics)
472         {
473             NDalicManualPINVOKE.FontClient_GetFontMetrics(swigCPtr, fontId, FontMetrics.getCPtr(metrics));
474             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
475         }
476
477         internal uint GetGlyphIndex(uint fontId, uint charcode)
478         {
479             uint ret = NDalicManualPINVOKE.FontClient_GetGlyphIndex(swigCPtr, fontId, charcode);
480             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
481             return ret;
482         }
483
484         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type, bool horizontal)
485         {
486             bool ret = NDalicManualPINVOKE.FontClient_GetGlyphMetrics__SWIG_0(swigCPtr, GlyphInfo.getCPtr(array), size, (int)type, horizontal);
487             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
488             return ret;
489         }
490
491         internal bool GetGlyphMetrics(GlyphInfo array, uint size, GlyphType type)
492         {
493             bool ret = NDalicManualPINVOKE.FontClient_GetGlyphMetrics__SWIG_1(swigCPtr, GlyphInfo.getCPtr(array), size, (int)type);
494             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495             return ret;
496         }
497
498         internal void CreateBitmap(uint fontId, uint glyphIndex, FontClient.GlyphBufferData data, int outlineWidth)
499         {
500             NDalicManualPINVOKE.FontClient_CreateBitmap__SWIG_0(swigCPtr, fontId, glyphIndex, FontClient.GlyphBufferData.getCPtr(data), outlineWidth);
501             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502         }
503
504         internal PixelData CreateBitmap(uint fontId, uint glyphIndex, int outlineWidth)
505         {
506             PixelData ret = new PixelData(NDalicManualPINVOKE.FontClient_CreateBitmap__SWIG_1(swigCPtr, fontId, glyphIndex, outlineWidth), true);
507             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
508             return ret;
509         }
510
511         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)
512         {
513             NDalicManualPINVOKE.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));
514             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515         }
516
517         internal GlyphInfo GetEllipsisGlyph(uint requestedPointSize)
518         {
519             GlyphInfo ret = new GlyphInfo(NDalicManualPINVOKE.FontClient_GetEllipsisGlyph(swigCPtr, requestedPointSize), false);
520             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521             return ret;
522         }
523
524         internal bool IsColorGlyph(uint fontId, uint glyphIndex)
525         {
526             bool ret = NDalicManualPINVOKE.FontClient_IsColorGlyph(swigCPtr, fontId, glyphIndex);
527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528             return ret;
529         }
530
531         /// <summary>
532         /// Add custom fonts directory.
533         /// </summary>
534         /// <param name="path">Path to the fonts directory.</param>
535         /// <returns>True if the fonts can be added.</returns>
536         /// <since_tizen> 5 </since_tizen>
537         public bool AddCustomFontDirectory(string path)
538         {
539             bool ret = NDalicManualPINVOKE.FontClient_AddCustomFontDirectory(swigCPtr, path);
540             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
541             return ret;
542         }
543     }
544 }