Skip to content
Myr

Merge branch 'master' of https://github.com/cap/stb into work2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 25e9e1e, 7579b8a · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:stb_truetype.h+3 added-2 removed
220 unmodified lines
221#if 0222#define STB_TRUETYPE_IMPLEMENTATION // force following include to generate implementation223#include "stb_truetype.h"224225char ttf_buffer[1<<20];225unsigned char ttf_buffer[1<<20];226unsigned char temp_bitmap[512*512];227228stbtt_bakedchar cdata[96]; // ASCII 32..126 is 95 glyphs229GLstbtt_uint ftex;229GLuint ftex;230231void my_stbtt_initfont(void)232{233 fread(ttf_buffer, 1, 1<<20, fopen("c:/windows/fonts/times.ttf", "rb"));
8 unmodified lines
242243void my_stbtt_print(float x, float y, char *text)244{245 // assume orthographic projection with units = screen pixels, origin at top left246 glEnable(GL_TEXTURE_2D);247 glBindTexture(GL_TEXTURE_2D, ftex);248 glBegin(GL_QUADS);249 while (*text) {250 if (*text >= 32 && *text < 128) {
2363 unmodified lines