HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FONT_Enums.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: FONT_Enums.h ( FONT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __FONT_Enums__
12 #define __FONT_Enums__
13 
14 #include "FONT_API.h"
15 
16 /// An enum used with FONT_Registry::getVariant to pick a specific font
17 /// variation given a base font. For oblique variations, this can either mean
18 /// oblique or italic fonts, although oblique is preferred if it exists.
20 {
21  FONT_VARIANT_NORMAL, ///< Returns a normal weight, non-oblique variation.
22  FONT_VARIANT_OBLIQUE, ///< Returns a normal weight, oblique variation.
23  FONT_VARIANT_BOLD, ///< Returns a bold weight, non-oblique variation.
24  FONT_VARIANT_BOLD_OBLIQUE ///< Returns a bold weight, oblique variation.
25 };
26 
27 
28 /// The font's style describes its visual appearance.
30 {
31  FONT_STYLE_NORMAL = 0, ///< No extra visual styles apply
32  FONT_STYLE_ITALIC = 1 << 0, ///< Font is italic (calligraphic)
33  FONT_STYLE_OBLIQUE = 1 << 1, ///< Font is slanted
34  FONT_STYLE_MONOSPACED = 1 << 2, ///< Font is mono-spaced
35  FONT_STYLE_DUALSPACED = 1 << 3, ///< Font is dual-spaced (e.g. CJK)
36  FONT_STYLE_SYMBOL = 1 << 4 ///< Font is a symbol font (e.g. wingdings).
37 };
38 
39 static inline FONT_Style
41 {
42  return FONT_Style((int)s1 | (int)s2);
43 }
44 static inline FONT_Style
45 operator&(FONT_Style s1, FONT_Style s2)
46 {
47  return FONT_Style((int)s1 & (int)s2);
48 }
50 {
61 };
62 
63 // For UT::ArraySet
64 namespace UT {
65 
66 template<typename T>
68 
69 template<>
71 {
72  static constexpr FONT_Style SENTINEL = FONT_Style(0x80000000);
73  static void clear(FONT_Style &v) { v = SENTINEL; }
74  static bool isClear(FONT_Style v) { return v == SENTINEL; }
75  static void clearConstruct(FONT_Style *p) { clear(*p); }
76 
77  static const bool clearNeedsDestruction = false;
78 };
79 
80 template<>
82 {
83  static constexpr FONT_Weight SENTINEL = FONT_Weight(0);
84  static void clear(FONT_Weight &v) { v = SENTINEL; }
85  static bool isClear(FONT_Weight v) { return v == SENTINEL; }
86  static void clearConstruct(FONT_Weight *p) { clear(*p); }
87 
88  static const bool clearNeedsDestruction = false;
89 };
90 
91 } // namespace UT
92 
93 #endif // __FONT_Enums__
png_voidp s1
Definition: png.h:2193
static void clearConstruct(FONT_Weight *p)
Definition: FONT_Enums.h:86
const GLdouble * v
Definition: glcorearb.h:836
Font is dual-spaced (e.g. CJK)
Definition: FONT_Enums.h:35
FONT_Weight
Definition: FONT_Enums.h:49
Font is italic (calligraphic)
Definition: FONT_Enums.h:32
FONT_Style
The font's style describes its visual appearance.
Definition: FONT_Enums.h:29
Returns a bold weight, non-oblique variation.
Definition: FONT_Enums.h:23
static bool isClear(FONT_Style v)
Definition: FONT_Enums.h:74
Font is mono-spaced.
Definition: FONT_Enums.h:34
FONT_Variant
Definition: FONT_Enums.h:19
Returns a normal weight, oblique variation.
Definition: FONT_Enums.h:22
static void clear(FONT_Weight &v)
Definition: FONT_Enums.h:84
No extra visual styles apply.
Definition: FONT_Enums.h:31
Returns a bold weight, oblique variation.
Definition: FONT_Enums.h:24
png_voidp png_voidp s2
Definition: png.h:2193
Font is slanted.
Definition: FONT_Enums.h:33
static void clearConstruct(FONT_Style *p)
Definition: FONT_Enums.h:75
static void clear(FONT_Style &v)
Definition: FONT_Enums.h:73
Font is a symbol font (e.g. wingdings).
Definition: FONT_Enums.h:36
static bool isClear(FONT_Weight v)
Definition: FONT_Enums.h:85
RTCSceneFlags operator|(const RTCSceneFlags a, const RTCSceneFlags b)
Helper to easily combing scene flags.
Definition: rtcore.h:280
Returns a normal weight, non-oblique variation.
Definition: FONT_Enums.h:21