Commit Graph

73 Commits

Author SHA1 Message Date
Alex Szpakowski 98b258b75f Fixed font textures in OpenGL returning black RGB values when a shader is active (reverts changeset 69b0b4e) 2013-12-31 22:09:04 -04:00
Alex Szpakowski 90f4dea4ab The TrueType rasterizer now properly recognizes the monochrome bitmap pixel mode for glyphs (resolves issue #818) 2013-12-31 21:32:58 -04:00
Alex Szpakowski f3bd944cf5 Reduced the RAM and VRAM space taken up by TrueType font glyphs by 1/2. 2013-12-31 20:15:55 -04:00
Alex Szpakowski eb4fdf3bbe Use a separate preprocessor define for using Framework #includes in OS X (resolves issue #796) 2013-12-13 02:37:06 -04:00
Bart van Strien 3d82eecc08 Apply the love-experiment moduleselect branch
You can now:
	- Enable and disable love's modules, implementations and libraries using configure switches
	- Use pkg-config for a couple of love's requirements
	- Build on OSX
	- Use newer versions of FreeType2
	- Get a slightly better error message using automagic
2013-12-08 19:32:32 +01:00
Alex Szpakowski 4e321697d3 Renamed Font:hasGlyph to Font:hasGlyphs, and expanded it to accept multiple arguments and full strings. Resolves issue #762. 2013-10-25 21:56:32 -03:00
Alex Szpakowski 74f26160da Fixed a couple bugs caught by clang's static analyzer 2013-09-18 18:30:12 -03:00
Alex Szpakowski 06f80d5c08 Fixed undefined behaviour when love exceptions are converted into Lua errors (resolves issue #729) 2013-09-05 23:17:29 -03:00
Alex Szpakowski c15fc4453b Re-added Data:getPointer (can be used with LuaJIT's FFI) 2013-08-29 17:16:21 -03:00
Alex Szpakowski ec9dec6b80 Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.

This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski 6e3a7288dd Improved performance of ImageData:mapPixel (now up to 2x as fast as in 0.8.0!); love.graphics.newImage, Image:refresh, love.window.setIcon, and ImageRasterizers now prevent other threads from modifying the ImageData used in those functions until they're done accessing it 2013-06-25 05:28:20 -03:00
Alex Szpakowski 6281d60b8c Fixed compilation in visual studio 2013-06-18 17:31:47 -03:00
Alex Szpakowski 76618f0328 Cleaned up font code to always use uint32 instead of the slightly more ambiguous "unsigned int" for codepoints 2013-06-16 19:48:53 -03:00
Alex Szpakowski d48d1fd441 Exposed the internal Rasterizer and GlyphData object methods to Lua. Also added Font:hasGlyph. 2013-06-16 07:36:18 -03:00
Alex Szpakowski dd9cca1a55 Added Data:getString to GlyphData 2013-06-16 04:10:09 -03:00
Alex Szpakowski 9fc2a085cd Updated love.timer.getTime to be microsecond-precise and monotonic (thanks Boolsheet), removed the now-obsolete love.timer.getMicroTime (issue #492) 2013-05-09 23:12:50 -03:00
Alex Szpakowski 4c616e409b Renamed ParticleSystem:count, Channel:count, and all getNum* functions to get*Count (issue #602) 2013-05-03 04:04:44 -03:00
Alex Szpakowski 16f3a93f28 Removed vestigial internal code for Data:getPointer 2013-04-26 22:05:58 -07:00
Alex Szpakowski 7403245715 Cosmetic code improvements
--HG--
branch : image-CompressedData
2013-04-07 22:58:08 -03:00
Alex Szpakowski 668a1bfa6d Silenced some compiler warnings 2013-02-09 21:24:41 -04:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Alex Szpakowski 09ee533cea Cleaned up TrueType Rasterizer code 2013-01-27 17:18:11 -04:00
Alex Szpakowski 383bed8098 Use const references for string function arguments 2013-01-23 15:28:11 -04:00
Alex Szpakowski 191af5cd5b Minor cosmetics 2013-01-23 06:26:17 -04:00
Alex Szpakowski 76b0537eff ImageFonts now replace the spacer color with transparency when generating a glyph instead of when first parsing ImageData (source ImageData used to generate an ImageFont is now unmolested.) 2013-01-23 06:00:28 -04:00
Alex Szpakowski 6247e7b60b Removed silly exception case 2013-01-23 03:15:49 -04:00
Alex Szpakowski e51a9eb25d Added support for UTF-8 ImageFont glyphs and ImageFonts with more than 256 characters 2013-01-23 03:02:46 -04:00
Alex Szpakowski 022f549554 Use unsigned ints instead of unsigned shorts to represent UTF8 font glyphs 2013-01-22 23:43:35 -04:00
Bart van Strien 68a895e7c6 Catch errors in love.font.newRasterizer, add luax_pconvobj which pcalls, allowing love.graphics.newFont to clean up before re-erroring 2012-12-15 14:26:46 +01:00
Bart van Strien 63daffb22f Correctly set the spacing for the last character in an ImageFont as well 2012-08-21 15:18:12 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien c707a4ca45 Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations) 2011-12-24 01:10:40 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bart van Strien 49ec65dbf3 Oops, didn't have a clean tree 2011-11-05 23:17:32 +01:00
Bart van Strien d8666202cd Improve compatibility check (I still can't believe robin was right) 2011-11-05 22:07:15 +01:00
Bill Meltsner a763fc8863 some more cleanup 2011-05-08 18:50:01 -04:00
rude 3fe9b2ff16 Reverted module selection feature. This is not really desired.
Users (or lovers) do not get to choose which implementation of
a module they would like to use.

The abstraction is for dealing with portability issues, not
for giving people the ability to choose an alternative
(inferior) backend. The best choice for any platform/situation
should at all times be the *default* for that platform/situation.
If this is not the case; it's a bug (that is easily fixed).

Any module should provide the functionality promised in the docs.
The lover (or user) should not care how, and if [s]he does, [s]he
does still not get to choose.

Also, a related note: duplication of wrapper code is something I
especially wanted to avoid when I first (or should I say ...
"eventually") formed the current architecture.

--HG--
branch : minor
2011-03-26 17:06:05 +01:00
Bart van Strien b4139ffab5 Rename loaders to fit their locations
--HG--
branch : minor
2011-03-13 20:25:35 +01:00
Bill Meltsner 9d38cba626 brutally murdered padding and predefined glyph loading
--HG--
branch : newfont
2011-03-05 23:37:36 -05:00
Bill Meltsner 94b4319878 trashed old unnecessary font stuff - compiles, but obviously will not work yet
--HG--
branch : newfont
2011-03-05 23:17:36 -05:00
Bill Meltsner fde708160e bringing in the new year by changing every 2010 to 2011 2011-01-15 14:40:27 -06:00
Bill Meltsner 938f395a51 Fixed a bug with ImageFonts and chars > 127 2011-01-08 20:56:30 -06:00
Bill Meltsner 417c20e6fa upgraded Mac freetype to 2.4.3, now using a custom freetype framework that's set up much more nicely (and is actually slightly smaller!) 2010-11-10 22:27:57 -05:00
Bill Meltsner 54f7a83662 made truetype fonts use luminance-alpha format for their data instead of rgba (thus halving their memory requirements) 2010-11-09 19:10:04 -05:00
Bill Meltsner 37baf32374 changed LUMINOSITY_ALPHA to LUMINANCE_ALPHA (more consistent with opengl's phrasing) 2010-11-09 19:07:51 -05:00
Bart van Strien 7e318cc9b2 Let's hope I finally smashed those mem leaks 2010-09-18 20:22:29 +02:00
Bart van Strien 2b273c0081 Hopefully fixed more memory leakage in fonts 2010-09-18 10:07:52 +02:00
rude 8c721ceb6a Some small fixes to make LOVE compilable in MSVC2010. 2010-09-05 12:05:05 +02:00