• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup Drawing
18  * @{
19  *
20  * @brief Provides the 2D drawing capability.
21  *
22  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
23  *
24  * @since 8
25  * @version 1.0
26  */
27 
28 /**
29  * @file drawing_font_collection.h
30  *
31  * @brief Declares functions related to <b>FontCollection</b> in the drawing module.
32  *
33  * @kit ArkGraphics2D
34  * @library libnative_drawing.so
35  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
36  * @since 8
37  * @version 1.0
38  */
39 
40 #ifndef C_INCLUDE_DRAWING_FONT_COLLECTION_H
41 #define C_INCLUDE_DRAWING_FONT_COLLECTION_H
42 
43 #include "drawing_text_declaration.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 /**
49  * @brief Creates an <b>OH_Drawing_FontCollection</b> object.
50  *
51  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
52  * @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.
53  * @since 8
54  * @version 1.0
55  */
56 OH_Drawing_FontCollection* OH_Drawing_CreateFontCollection(void);
57 
58 /**
59  * @brief Releases the memory occupied by an <b>OH_Drawing_FontCollection</b> object.
60  *
61  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
62  * @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
63  * @since 8
64  * @version 1.0
65  */
66 void OH_Drawing_DestroyFontCollection(OH_Drawing_FontCollection* fontCollection);
67 
68 /**
69  * @brief Disable the font collection fallback.
70  *
71  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
72  * @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
73  * @since 12
74  * @version 1.0
75  */
76 void OH_Drawing_DisableFontCollectionFallback(OH_Drawing_FontCollection* fontCollection);
77 
78 /**
79  * @brief Disable the font collection systemfont.
80  *
81  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
82  * @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
83  * @since 12
84  * @version 1.0
85  */
86 void OH_Drawing_DisableFontCollectionSystemFont(OH_Drawing_FontCollection* fontCollection);
87 
88 /**
89  * @brief Creates an <b>OH_Drawing_FontCollection</b> object with shared usage between
90  * <b>OH_Drawing_TypographyCreate</b>.
91  *
92  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
93  * @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.
94  * @since 12
95  * @version 1.0
96  */
97 OH_Drawing_FontCollection* OH_Drawing_CreateSharedFontCollection(void);
98 
99 /**
100  * @brief Clear font caches.
101  *
102  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
103  * @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
104  * @since 12
105  * @version 1.0
106  */
107 void OH_Drawing_ClearFontCaches(OH_Drawing_FontCollection* fontCollection);
108 
109 /**
110  * @brief Get the <b>OH_Drawing_FontCollection</b> global instance.
111  *
112  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
113  * @return Return the pointer to the <b>OH_Drawing_FontCollection</b> global instance.
114  * @since 14
115  * @version 1.0
116  */
117 OH_Drawing_FontCollection* OH_Drawing_GetFontCollectionGlobalInstance(void);
118 #ifdef __cplusplus
119 }
120 #endif
121 /** @} */
122 #endif