Commit Graph

22 Commits (90c18fd41a4f4f6c47e4b7600f798a91b97f4513)

Author SHA1 Message Date
ocornut 90c18fd41a stb_truetype: split stbtt_PackFontRanges() into 3 functions for advanced uses, allow stbtt_PackBegin() to take NULL pixels 2015-01-18 15:24:33 +00:00
Sean Barrett 00965512d7 update version number 2014-12-10 00:29:25 -08:00
Sean Barrett 26439254e8 fix use of stbrp_coord if no stb_rect_pack;
fix a few assert()s that weren't STBTT_asserts();
fix missing cast for C++
fix typo in C++ test compilation that prevented it from trying to compile stb_truetype
2014-12-10 00:27:11 -08:00
Sean Barrett 34eec7cc5d Merge branch 'oversample_shift' of https://github.com/rygorous/stb 2014-12-08 20:00:18 -08:00
Sean Barrett d1c85eac78 update version numbers 2014-12-08 19:58:51 -08:00
Sean Barrett 97037461d9 stb_truetype:
STBTT_POINT_SIZE
   documentation for above

stb_rect_pack:
   STBRP_ASSERT
2014-12-08 19:56:39 -08:00
Fabian Giesen 82677e5518 stb_truetype: Fix implicit conversion warnings. 2014-12-08 19:51:39 -08:00
Fabian Giesen 27974c42f9 stb_truetype: Negative size = pixels for EM square. 2014-12-08 19:43:27 -08:00
Fabian Giesen 5f674fc7e5 stb_truetype: Cancel out phase offset from box filter correctly. 2014-12-08 19:20:41 -08:00
Sean Barrett 22dbcffef7 stbtt_Pack* documentation
oversample test tweaks
2014-12-06 23:00:59 -08:00
Sean Barrett f03e352093 stb_rect_pack: fix LARGE_RECT bug
stb_truetype: oversampling, including oversampling demo app
2014-12-06 12:28:46 -08:00
Sean Barrett 0a3dd5aff3 new font bitmap baking API 2014-12-02 02:59:44 -08:00
Sean Barrett c32d5c40d2 update version number & contributors 2014-09-18 07:13:57 -07:00
Fabian Giesen f36b7116e2 Fix a few bugs with subpixel shifts, shift_y in particular.
1. In the presence of nonzero shift_x / shift_y,
   stbtt_GetGlyphBitmapBoxSubpixel would return a nonzero-sized bounding
   box for empty glyphs (e.g. spaces). Since such glyphs don't have any
   outlines, the rasterizer wouldn't do anything, resulting in a 1x1-pixel
   image with uninitialized memory.
2. GetGlyphBitmapBoxSubpixel added shift_y then flipped the y axis,
   whereas the rasterizer flipped the y axis then added shift_y.
   Consistently flip-then-add in both places. This also makes the pattern
   of floors/ceils in GetGlyphBitmapBoxSubpixel simpler.
3. The rasterizer added shift_y after multiplying by the vertical
   oversampling factor, instead of before.

Vertical shifts now work much better, in my tests anyway.
2014-09-17 22:54:16 -07:00
Sean Barrett d26beed67d comments/ version update for platformID = Unicode 2014-08-07 04:41:02 -07:00
Sean Barrett 0adfac0abe Merge branch 'master' of https://github.com/HouQiming/stb into working 2014-08-07 04:35:51 -07:00
Sean Barrett 2da2806d20 update version numbers due to warnings/minor fixes 2014-07-07 16:24:11 -07:00
HouQiming 8c83fc2bad Added STBTT_PLATFORM_ID_UNICODE
Added a STBTT_PLATFORM_ID_UNICODE clause to support iOS/Mac fonts
2014-07-02 18:58:52 +08:00
johan 816ea35435 warn correction
gcc warning: unused parameter removed for macro STBTT_free
2014-06-23 01:17:43 +02:00
Sean Barrett d06c987810 update version number 2014-05-25 21:03:53 -07:00
Sean Barrett eb62c741ea fixed warnings for stb_truetype (fixes all outstanding bug reports) 2014-05-25 20:56:24 -07:00
Sean Barrett 9b067cb69c add stb_truetype 2014-05-25 11:10:31 -07:00