File tree Expand file tree Collapse file tree 3 files changed +28
-29
lines changed Expand file tree Collapse file tree 3 files changed +28
-29
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,32 @@ struct WindowConfig {
5151 int vidWidth, vidHeight; // what the game is using
5252};
5353
54+ // font support
55+ struct glyphInfo_t
56+ {
57+ int height; // number of scan lines
58+ int top; // top of glyph in buffer
59+ int bottom; // bottom of glyph in buffer
60+ int pitch; // width for copying
61+ int xSkip; // x adjustment
62+ int imageWidth; // width of actual image
63+ int imageHeight; // height of actual image
64+ float s; // x offset in image where glyph starts
65+ float t; // y offset in image where glyph starts
66+ float s2;
67+ float t2;
68+ qhandle_t glyph; // handle to the shader with the glyph
69+ char shaderName[ 32 ];
70+ };
71+
72+ struct fontInfo_t
73+ {
74+ void *face, *faceData;
75+ glyphInfo_t *glyphBlock[0x110000 / 256 ]; // glyphBlock_t
76+ int pointSize;
77+ char name[ MAX_QPATH ];
78+ };
79+
5480//
5581// these are the functions exported by the refresh module
5682//
Original file line number Diff line number Diff line change @@ -2152,35 +2152,6 @@ union OpaquePlayerState {
21522152 CA_ACTIVE, // game views should be displayed
21532153 };
21542154
2155- // font support
2156-
2157- struct glyphInfo_t
2158- {
2159- int height; // number of scan lines
2160- int top; // top of glyph in buffer
2161- int bottom; // bottom of glyph in buffer
2162- int pitch; // width for copying
2163- int xSkip; // x adjustment
2164- int imageWidth; // width of actual image
2165- int imageHeight; // height of actual image
2166- float s; // x offset in image where glyph starts
2167- float t; // y offset in image where glyph starts
2168- float s2;
2169- float t2;
2170- qhandle_t glyph; // handle to the shader with the glyph
2171- char shaderName[ 32 ];
2172- };
2173-
2174- using glyphBlock_t = glyphInfo_t[256 ];
2175-
2176- struct fontInfo_t
2177- {
2178- void *face, *faceData;
2179- glyphInfo_t *glyphBlock[0x110000 / 256 ]; // glyphBlock_t
2180- int pointSize;
2181- char name[ MAX_QPATH ];
2182- };
2183-
21842155// real time
21852156// =============================================
21862157
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ Maryland 20850 USA.
5050#define _CEIL ( x ) ( ( ( x ) + 63 ) & - 64 )
5151#define _TRUNC ( x ) ( ( x ) >> 6 )
5252
53+ using glyphBlock_t = glyphInfo_t[256 ];
54+
5355FT_Library ftLibrary = nullptr ;
5456
5557static const int FONT_SIZE = 512 ;
You can’t perform that action at this time.
0 commit comments