summaryrefslogtreecommitdiff
path: root/src/ui/text.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-05 06:55:51 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-05 06:55:51 +0300
commit827951d2807b031d131b7fc05b1596550d258676 (patch)
tree836a6a1ceb07cfbc1867ef65fcc30331b0ad33ba /src/ui/text.h
parent88993e95e5ff9fecc5980b25e1778053ca23afe0 (diff)
Started working on font packs
Diffstat (limited to 'src/ui/text.h')
-rw-r--r--src/ui/text.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/ui/text.h b/src/ui/text.h
index 35ae48f8..1b3200d4 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -25,34 +25,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
25#include <the_Foundation/rect.h> 25#include <the_Foundation/rect.h>
26#include <the_Foundation/string.h> 26#include <the_Foundation/string.h>
27#include <the_Foundation/vec2.h> 27#include <the_Foundation/vec2.h>
28
29#include <SDL_render.h> 28#include <SDL_render.h>
30 29
31/* Content sizes: regular (1x) -> medium (1.2x) -> big (1.33x) -> large (1.67x) -> huge (2x) */ 30#include "fontpack.h"
32
33enum iFontSize {
34 uiNormal_FontSize, /* 1.000 */
35 uiMedium_FontSize, /* 1.125 */
36 uiBig_FontSize, /* 1.333 */
37 uiLarge_FontSize, /* 1.666 */
38 uiSmall_FontSize, /* 0.900 */
39 uiTiny_FontSize, /* 0.800 */
40 contentRegular_FontSize,
41 contentMedium_FontSize,
42 contentBig_FontSize,
43 contentLarge_FontSize,
44 contentHuge_FontSize,
45 contentMonoSmall_FontSize,
46 contentMono_FontSize,
47 max_FontSize,
48};
49 31
50iLocalDef enum iFontSize larger_FontSize(enum iFontSize size) { 32/* Content sizes: regular (1x) -> medium (1.2x) -> big (1.33x) -> large (1.67x) -> huge (2x) */
51 if (size == uiLarge_FontSize || size == contentHuge_FontSize || size == contentMono_FontSize) {
52 return size; /* biggest available */
53 }
54 return size + 1;
55}
56 33
57enum iFontId { 34enum iFontId {
58 /* UI fonts: normal weight (1x, 1.125x, 1.33x, 1.67x) */ 35 /* UI fonts: normal weight (1x, 1.125x, 1.33x, 1.67x) */
@@ -60,8 +37,8 @@ enum iFontId {
60 defaultMedium_FontId, 37 defaultMedium_FontId,
61 defaultBig_FontId, 38 defaultBig_FontId,
62 defaultLarge_FontId, 39 defaultLarge_FontId,
63 defaultSmall_FontId,
64 defaultTiny_FontId, 40 defaultTiny_FontId,
41 defaultSmall_FontId,
65 /* UI fonts: bold weight */ 42 /* UI fonts: bold weight */
66 defaultBold_FontId, 43 defaultBold_FontId,
67 defaultMediumBold_FontId, 44 defaultMediumBold_FontId,