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 #ifndef C_INCLUDE_DRAWING_FONT_COLLECTION_H 17 #define C_INCLUDE_DRAWING_FONT_COLLECTION_H 18 19 /** 20 * @addtogroup Drawing 21 * @{ 22 * 23 * @brief Provides the 2D drawing capability. 24 * 25 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 26 * 27 * @since 8 28 * @version 1.0 29 */ 30 31 /** 32 * @file drawing_font_collection.h 33 * 34 * @brief Declares functions related to <b>FontCollection</b> in the drawing module. 35 * 36 * @kit ArkGraphics2D 37 * @library libnative_drawing.so 38 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 39 * @since 8 40 * @version 1.0 41 */ 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 OH_Drawing_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*); 67 68 /** 69 * @brief Disable the font collection fallback. 70 * 71 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 72 * @param OH_Drawing_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*); 77 78 /** 79 * @brief Disable the font collection systemfont. 80 * 81 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 82 * @param OH_Drawing_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*); 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 OH_Drawing_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*); 108 #ifdef __cplusplus 109 } 110 #endif 111 /** @} */ 112 #endif