11#define LICE_FONT_FLAG_VERTICAL 1
12#define LICE_FONT_FLAG_VERTICAL_BOTTOMUP 2
14#define LICE_FONT_FLAG_PRECALCALL 4
16#define LICE_FONT_FLAG_FORCE_NATIVE 1024
18#define LICE_FONT_FLAG_FX_BLUR 16
19#define LICE_FONT_FLAG_FX_INVERT 32
20#define LICE_FONT_FLAG_FX_MONO 64
22#define LICE_FONT_FLAG_FX_SHADOW 128
23#define LICE_FONT_FLAG_FX_OUTLINE 256
25#define LICE_FONT_FLAG_OWNS_HFONT 512
28#define LICE_FONT_FLAGS_HAS_FX(flag) \
29 (flag&(LICE_FONT_FLAG_VERTICAL|LICE_FONT_FLAG_VERTICAL_BOTTOMUP| \
30 LICE_FONT_FLAG_FX_BLUR|LICE_FONT_FLAG_FX_INVERT|LICE_FONT_FLAG_FX_MONO| \
31 LICE_FONT_FLAG_FX_SHADOW|LICE_FONT_FLAG_FX_OUTLINE))
33#define LICE_DT_NEEDALPHA 0x80000000
34#define LICE_DT_USEFGALPHA 0x40000000
58#ifndef LICE_TEXT_NO_DECLARE_CACHEDFONT
123#ifndef LICE_TEXT_NO_MULTIDPI
158 f->SetTextColor(
m_fg);
165 return f->DrawText(bm,str,strcnt,rect,dtFlags);
186 if (
l) memset(
l,0,
sizeof(*
l)*maxsz);
196 m_flags = get_flags ? get_flags(0) : 0;
204 while (
x>=0 &&
t[
x].sz)
t[
x--].sz=0;
216 int ht =
m_lf.lfHeight, ht2 =
m_lf.lfWidth;
222 ht = (ht * sz) / 256;
223 ht2 = (ht2 * sz) / 256;
231 while (
x>=0 &&
t[
x].sz != ht &&
t[
x].sz)
x--;
232 if (
x<0)
t[
x=0].sz = 0;
244 if (!
t->sz &&
t->cache)
262 return f ?
f->GetLineHeight() : 10;
uint8_t a
Definition Spc_Cpu.h:141
float abs(const fft_t *freqs, off_t x)
Definition OscilGen.cpp:52
LICE_IFont * get(LICE_IBitmap *bm)
Definition lice_text.h:207
int m_lsadj
Definition lice_text.h:137
float m_alpha
Definition lice_text.h:136
LICE_pixel m_fg
Definition lice_text.h:134
void SetFromLogFont(LOGFONT *lf, int(*get_flags)(int))
Definition lice_text.h:192
virtual int DrawText(LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)
Definition lice_text.h:152
virtual LICE_pixel GetTextColor()
Definition lice_text.h:168
void clear()
Definition lice_text.h:200
virtual int GetLineHeight()
Definition lice_text.h:170
LICE_pixel m_bg
Definition lice_text.h:134
__LICE_dpiAwareFont(int maxsz)
Definition lice_text.h:174
virtual LICE_IFont * __CreateFont()=0
virtual LICE_pixel SetEffectColor(LICE_pixel color)
Definition lice_text.h:148
int(* m_getflags)(int)
Definition lice_text.h:132
virtual int SetBkMode(int bkmode)
Definition lice_text.h:149
LICE_pixel m_effectcol
Definition lice_text.h:134
int GetLineHeightDPI(LICE_IBitmap *bm)
Definition lice_text.h:259
int m_comb
Definition lice_text.h:135
virtual LICE_pixel SetTextColor(LICE_pixel color)
Definition lice_text.h:146
int m_bgmode
Definition lice_text.h:135
virtual void SetCombineMode(int combine, float alpha=1.0f)
Definition lice_text.h:150
LOGFONT m_lf
Definition lice_text.h:140
~__LICE_dpiAwareFont()
Definition lice_text.h:188
virtual HFONT GetHFont()
Definition lice_text.h:169
WDL_TypedBuf< rec > m_list
Definition lice_text.h:130
virtual void SetLineSpacingAdjust(int amt)
Definition lice_text.h:172
virtual LICE_pixel SetBkColor(LICE_pixel color)
Definition lice_text.h:147
virtual void SetFromHFont(HFONT font, int flags=0)
Definition lice_text.h:144
int m_flags
Definition lice_text.h:133
virtual LICE_pixel SetBkColor(LICE_pixel color)
Definition lice_text.h:69
virtual void SetCombineMode(int combine, float alpha=1.0f)
Definition lice_text.h:72
virtual void SetFromHFont(HFONT font, int flags=0)
Definition lice_textnew.cpp:122
bool RenderGlyph(unsigned short idx)
Definition lice_textnew.cpp:163
LICE_CachedFont()
Definition lice_textnew.cpp:93
LICE_pixel m_fg
Definition lice_text.h:94
int DrawTextImpl(LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)
Definition lice_textnew.cpp:765
virtual void SetLineSpacingAdjust(int amt)
Definition lice_text.h:83
float m_alpha
Definition lice_text.h:97
int m_lsadj
Definition lice_text.h:100
int m_comb
Definition lice_text.h:96
int m_bgmode
Definition lice_text.h:95
LICE_pixel m_bg
Definition lice_text.h:94
virtual int GetLineHeight()
Definition lice_text.h:81
WDL_TypedBuf< charEnt > m_extracharlist
Definition lice_text.h:112
virtual ~LICE_CachedFont()
Definition lice_textnew.cpp:108
const char * NextWordBreak(const char *str, int strcnt, int w)
Definition lice_textnew.cpp:741
virtual LICE_pixel SetTextColor(LICE_pixel color)
Definition lice_text.h:68
virtual LICE_pixel SetEffectColor(LICE_pixel color)
Definition lice_text.h:70
charEnt m_lowchars[128]
Definition lice_text.h:111
LICE_pixel m_effectcol
Definition lice_text.h:94
static int _charSortFunc(const void *a, const void *b)
Definition lice_textnew.cpp:86
charEnt * findChar(unsigned short c)
Definition lice_textnew.cpp:525
virtual LICE_pixel GetTextColor()
Definition lice_text.h:79
virtual bool DrawGlyph(LICE_IBitmap *bm, unsigned short c, int xpos, int ypos, RECT *clipR)
Definition lice_textnew.cpp:534
WDL_TypedBuf< unsigned char > m_cachestore
Definition lice_text.h:113
HFONT m_font
Definition lice_text.h:117
virtual HFONT GetHFont()
Definition lice_text.h:80
virtual int DrawText(LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)
Definition lice_text.h:74
int m_flags
Definition lice_text.h:98
int m_line_height
Definition lice_text.h:100
virtual int SetBkMode(int bkmode)
Definition lice_text.h:71
virtual INT_PTR Extended(int id, void *data)
Definition lice.h:98
Definition lice_text.h:37
virtual LICE_pixel GetTextColor()=0
virtual LICE_pixel SetEffectColor(LICE_pixel color)=0
virtual void SetFromHFont(HFONT font, int flags=0)=0
virtual LICE_pixel SetBkColor(LICE_pixel color)=0
virtual int SetBkMode(int bkmode)=0
virtual ~LICE_IFont()
Definition lice_text.h:39
virtual LICE_pixel SetTextColor(LICE_pixel color)=0
virtual void SetLineSpacingAdjust(int amt)=0
virtual HFONT GetHFont()=0
virtual int DrawText(LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)=0
virtual void SetCombineMode(int combine, float alpha=1.0f)=0
virtual int GetLineHeight()=0
virtual LICE_IFont * __CreateFont()
Definition lice_text.h:270
LICE_dpiAwareFont(int max)
Definition lice_text.h:269
UINT_D64 w
Definition inflate.c:942
int * l
Definition inflate.c:1579
G bk
Definition inflate.c:1058
struct huft * t
Definition inflate.c:943
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned f
Definition inflate.c:1572
#define LICE_EXT_GET_ANY_SCALING
Definition lice.h:105
unsigned int LICE_pixel
Definition lice.h:54
#define LICE_FONT_FLAG_PRECALCALL
Definition lice_text.h:14
#define LICE_FONT_FLAG_OWNS_HFONT
Definition lice_text.h:25
#define LICE_FONT_FLAG_FORCE_NATIVE
Definition lice_text.h:16
#define max(x, y)
Definition os.h:78
Definition lice_text.h:126
int sz
Definition lice_text.h:128
LICE_IFont * cache
Definition lice_text.h:127
Definition lice_text.h:102
int base_offset
Definition lice_text.h:103
int advance
Definition lice_text.h:105
int height
Definition lice_text.h:104
int width
Definition lice_text.h:104
int left_extra
Definition lice_text.h:107
int charid
Definition lice_text.h:106
Definition swell-types.h:519
char lfQuality
Definition swell-types.h:522
int lfHeight
Definition swell-types.h:520
int lfWidth
Definition swell-types.h:520
Definition swell-types.h:231
#define NONANTIALIASED_QUALITY
HFONT CreateFontIndirect(LOGFONT *lf)
Definition swell-gdi-generic.cpp:160
unsigned int UINT
Definition swell-types.h:166
struct HGDIOBJ__ * HFONT
Definition swell-types.h:272
return c
Definition crypt.c:175
typedef int(UZ_EXP MsgFn)()