/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _PRCFONTKEYSSAMEFONT_INCLUDED_ #define _PRCFONTKEYSSAMEFONT_INCLUDED_ /** \details Class stores and operates information about a list of usages for the same font and character set with various attributes. */ class PRC_TOOLKIT OdPrcFontKeysSameFont { public: /** \details A structure that stores information about font attributes. */ struct FontKey { /** \details Creates a new instance of the font attributes structure with default parameters. */ FontKey() { font_size = attributes = 0; } /** Font size.*/ OdInt32 font_size; /** \details Font attribute flags. Flags are stored in the appropriate bits of an 8-bit unsigned integer, according to the table below.
Bit PositionValue (when Only This flag is ON)Description
01Bold flag.
12Italic flag.
24Underlined flag.
38Strike-Out flag.
416Overlined flag.
532Stretch flag. If switched on, it indicates that the text must be stretched to fit within its bounding box. It used only if the original font is not used.
664Wire flag. If switched on, the original font is a wireframe font.
7128Fixed width flag. If switched on, the original font is not proportional (each glyph has the same width).
*/ OdUInt8 attributes; }; private: OdArray m_font_keys; OdUInt32 m_char_set; OdString m_font_name; public: //DOM-IGNORE-BEGIN PRC_DECLARE_CIO(OdPrcFontKeysSameFont) //DOM-IGNORE-END /** \details Requests the current list of font keys. \returns An array of items. \remarks The array is returned via a reference, and therefore it can be used to set a new array. To restrict modifications of the font key array outside the object, call another method that returns a constant reference. */ OdArray &fontKeys(); /** \details Requests the current list of font keys. \returns An array of items. */ const OdArray &fontKeys() const; /** \details Sets a new font name. \param font_name [in] A string that contains the new font name. */ void setFontName(OdString font_name); /** \details Requests the current font name. \returns A string that contains the current font name. */ OdString fontName() const; /** \details Sets a new character set code for the font. \param char_set [in] An unsigned 32-bit integer that contains the code of the new character set. \remarks Applicable codes for character sets are represented in the table below: Value Description 0 Roman 1 Japanese 2 Traditional Chinese 3 Korean 4 Arabic 5 Hebrew 6 Greek 7 Cyrillic 8 RightLeft 9 Devanagari 10 Gurmukhi 11 Gujarati 12 Oriya 13 Bengali 14 Tamil 15 Telugu 16 Kannada 17 Malayalam 18 Sinhalese 19 Burmese 20 Khmer 21 Thai 22 Laotian 23 Georgian 24 Armenian 25 Simplified Chinese 26 Tibetan 27 Mongolian 28 Geez 29 EastEuropeanRoman 30 Vietnamese 31 ExtendedArabic
*/ void setCharSet(OdUInt32 char_set); /** \details Requests the current character set. \returns An unsigned 32-bit integer that contains the code of the current character set. \remarks Applicable codes for character sets are represented in the table below: Value Description 0 Roman 1 Japanese 2 Traditional Chinese 3 Korean 4 Arabic 5 Hebrew 6 Greek 7 Cyrillic 8 RightLeft 9 Devanagari 10 Gurmukhi 11 Gujarati 12 Oriya 13 Bengali 14 Tamil 15 Telugu 16 Kannada 17 Malayalam 18 Sinhalese 19 Burmese 20 Khmer 21 Thai 22 Laotian 23 Georgian 24 Armenian 25 Simplified Chinese 26 Tibetan 27 Mongolian 28 Geez 29 EastEuropeanRoman 30 Vietnamese 31 ExtendedArabic
*/ OdUInt32 charSet() const; }; /** \details A data type that represents an array of objects. */ typedef OdArray OdPrcFontKeysSameFontArray; #endif // _PRCFONTKEYSSAMEFONT_INCLUDED_