summaryrefslogtreecommitdiff
path: root/src/ui/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/text.h')
-rw-r--r--src/ui/text.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ui/text.h b/src/ui/text.h
index 2d49a1a6..2b4ec5c3 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -1,3 +1,25 @@
1/* Copyright 2020 Jaakko Keränen <jaakko.keranen@iki.fi>
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are met:
5
61. Redistributions of source code must retain the above copyright notice, this
7 list of conditions and the following disclaimer.
82. Redistributions in binary form must reproduce the above copyright notice,
9 this list of conditions and the following disclaimer in the documentation
10 and/or other materials provided with the distribution.
11
12THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
13ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
16ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
22
1#pragma once 23#pragma once
2 24
3#include <the_Foundation/rect.h> 25#include <the_Foundation/rect.h>
@@ -36,6 +58,7 @@ enum iFontId {
36 hugeEmoji_FontId, 58 hugeEmoji_FontId,
37 smallEmoji_FontId, 59 smallEmoji_FontId,
38 max_FontId, 60 max_FontId,
61
39 /* Meta: */ 62 /* Meta: */
40 fromSymbolsToEmojiOffset_FontId = 7, 63 fromSymbolsToEmojiOffset_FontId = 7,
41 /* UI fonts: */ 64 /* UI fonts: */
@@ -90,6 +113,11 @@ void drawRange_Text (int fontId, iInt2 pos, int color, iRangecc text);
90 113
91SDL_Texture * glyphCache_Text (void); 114SDL_Texture * glyphCache_Text (void);
92 115
116enum iTextBlockMode { quadrants_TextBlockMode, shading_TextBlockMode };
117
118iString * renderBlockChars_Text (const iBlock *fontData, int height, enum iTextBlockMode,
119 const iString *text);
120
93/*-----------------------------------------------------------------------------------------------*/ 121/*-----------------------------------------------------------------------------------------------*/
94 122
95iDeclareType(TextBuf) 123iDeclareType(TextBuf)