summaryrefslogtreecommitdiff
path: root/firmware/export/font.h (follow)
Commit message (Collapse)AuthorAge
* fonts: Fix regression(s) caused by c23ce62.Thomas Martitz2014-01-26
| | | | | | | | | | | | | The builtin sysfont does not have an associated buflib_alloc_data (because it's builtin right?). font_get_{width,bits} accessed a field of it for all fonts which crashed on some systems but not on mine. Solution: Move this field to struct font directly. The cache size calculated was also busted. Fixes FS#12944 and most likely FS#12938. Change-Id: I32303c4335a12a6c421fdca34f7ece851aac12ca
* fonts: Do not unload completely on USB.Thomas Martitz2014-01-15
| | | | | | | | | The font engine can now perform cache lookups even if the font file is closed, if the font was disabled with the new font_disable_all() function. It is highly probable that the lookup succeeds but in the cache-miss case a blank, full-width glyph will be returned. Change-Id: I3c97e747d2a0ba30c7b495c6118c9f029d265b56
* Increase MAXUSERFONTS to 12.Frank Gevaerts2013-04-01
| | | | | | | | | In the modern everything-can-be-skinned world, themes are beginning to hit the limit of 8 fonts (which includes sysfont). Increasing this to 12 will allow some headroom, at the cost of a bit more RAM usage (about 20 bytes per extra possible font, so about 80 bytes total here) Change-Id: Iddf4374b7ccf92b400614a7309bf3d2147ba98ab
* glyph_cache_save should be staticFrank Gevaerts2011-11-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31073 a1c6a512-1295-4272-9138-f99709370657
* FS#12293 Global default glyph setting in System > Limits > Glyphs To Cache. ↵Fred Bauer2011-11-19
| | | | | | Defaults to 250. This saves a lot of RAM while still allowing non-English users to have adequate glyph coverage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31031 a1c6a512-1295-4272-9138-f99709370657
* Redo r30826 (and hopefully not reintroduce font issues) which cleans up the ↵Jonathan Gordon2011-11-08
| | | | | | font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
* Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI ↵Fred Bauer2011-10-22
| | | | | | used to be fixed at zero but since buflib-fonts (r30589) can be different, depending on the order of loads and unloads. Fixes broken behavoir in virtual keyboard (FS#12336), lyrics player (FS#12306), and hopefully, FS#12337 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30826 a1c6a512-1295-4272-9138-f99709370657
* Provide font_lock(). Font_get_bits() or ..width() may have to read glyph ↵Fred Bauer2011-10-21
| | | | | | cache misses from disk so provide a means to lock the buflib memory during the wait. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30814 a1c6a512-1295-4272-9138-f99709370657
* Faster cached font loading. FS#12333Fred Bauer2011-10-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30769 a1c6a512-1295-4272-9138-f99709370657
* Fix Yellow: missing protoFred Bauer2011-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30761 a1c6a512-1295-4272-9138-f99709370657
* FS:12299 Font glyph cache is no longer saved. Each font will now have its ↵Fred Bauer2011-10-16
| | | | | | own glyph cache file with the extension '.gc' Includes a temporary fix that delays saving the file to prevent the creation of multiple gc files with same name. Mostly JD Gordon's code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30760 a1c6a512-1295-4272-9138-f99709370657
* Allow fonts to use smaller buffers than the default size. use font_load_ex() ↵Jonathan Gordon2011-09-24
| | | | | | to speficiy the buffer size. If the font is already loaded with a smaller buffer it will be reloaded to use the new size. Also fix an issue where handles would get lost if fonts fail to load in skins git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30592 a1c6a512-1295-4272-9138-f99709370657
* FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon2011-09-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
* Anti-Aliased Fonts support.Thomas Martitz2011-03-05
| | | | | | | | | | | | | This enables Rockbox to render anti-aliased fonts using an alpha blending method. The input font bitmaps are 4bit, i.e. 4x larger, but the metadata size stays the same. A tool, convttf, for converting ttf fonts directly to the Rockbox fnt format is provided. It has a useful help output, but the parameter that works best is -c1 or -c2 (2 for larger font sizes). Flyspray: FS#8961 Author: Initial work by Jonas Hurrelmann, further work by Fred Bauer, Andrew Mahone, Teruaki Kawashima and myself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29523 a1c6a512-1295-4272-9138-f99709370657
* change get_glyph_size() to font_glyphs_to_bufsize(). fixes a bug when font ↵Fred Bauer2010-08-27
| | | | | | glyph buffer < font header git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27911 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#11567 by Fred Bauer - better memory management for the skin fontsJonathan Gordon2010-08-25
| | | | | | %Fl now takes an optional 3rd param which is the number of glyphs to cache (default to 256). the smaller the number, the less ram will be used (i.e using 15 for a font which only shown numbers is a good idea) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27882 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* FS#10756 - Free unused init codeThomas Martitz2010-03-03
| | | | | | | Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
* undo that last undo, make the font loader more forgiving to user errorsJonathan Gordon2010-03-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24994 a1c6a512-1295-4272-9138-f99709370657
* revert r24989 ad r24990 which are cuasing segfaults... they were working ↵Jonathan Gordon2010-03-02
| | | | | | fine for me though :( (stupid font stuff is cursed!) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24993 a1c6a512-1295-4272-9138-f99709370657
* * Make the user font count more saneJonathan Gordon2010-03-02
| | | | | | | | | * font 2-9 in the skins will always be user fonts in the skins * init the skinfonts array so it doesnt think id 'x' is used already * make the parser work with FONT_UI untill the very end, even on remote fonts git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24989 a1c6a512-1295-4272-9138-f99709370657
* Revert r24958. It didn't fix anything (in fact, the problem described didn't ↵Thomas Martitz2010-03-01
| | | | | | exist). Increase MAXFONTS by 1 to allow for remote screen targets to load fonts 2-9. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24983 a1c6a512-1295-4272-9138-f99709370657
* redo r24943. the font mappings are not needed once the skin is finished ↵Jonathan Gordon2010-02-28
| | | | | | | | | parsing so using the skin buffer there is a waste and overcomplicates things. Also that commit breaks plain %pb so make sure you dont use %pb inside a viewport with a font number > 1 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24957 a1c6a512-1295-4272-9138-f99709370657
* FS#10984 - multifont! 2 major additions:Jonathan Gordon2010-02-14
| | | | | | | | | | 1) seperate UI font for the remote and main displays 2) allow individual skins to load additional fonts for use in the skin (Uo to 7 extra in this first version) see CustomWPS for info on how to load a font in the skins. Code should always use FONT_UI+screen_number to get the correct user font git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24644 a1c6a512-1295-4272-9138-f99709370657
* Font improvements: Fix bug that caused some fonts to be rendered garbled on ↵Nils Wallménius2009-12-13
| | | | | | custom builds with MAX_FONT_SIZE > 64k (closes FS#10844). Simplify version check. Use void pointer and explicit casting for the offsets to make it clearer that they may be of different sizes, add a comment too. Use uint16_t in stead of short in some places for consistency. Replace magic number with meaningful define. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23969 a1c6a512-1295-4272-9138-f99709370657
* Get rid of some of the code duplication from checkwps, it still duplicates a ↵Thomas Martitz2009-09-13
| | | | | | lot though. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22695 a1c6a512-1295-4272-9138-f99709370657
* Get checkwps working againMaurus Cuelenaere2009-01-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
* Added support for configurable rockbox directory. FS#9567 by Alex Bennee.Björn Stenberg2008-11-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19208 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Make checkwps compile again. Still more work is needed though, as checkwps ↵Dave Chapman2008-03-25
| | | | | | is compiled to emulate an iPod Color - this needs changing to allow the LCD (and remote LCD) dimensions/depth to be specified on the commandline - the new %V tags are validated against the LCD characteristics git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16807 a1c6a512-1295-4272-9138-f99709370657
* Tab policeNils Wallménius2007-09-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14691 a1c6a512-1295-4272-9138-f99709370657
* Change unsigned long to uint32_t and long to int32_t to fix a crash in Nils Wallménius2007-06-30
| | | | | | | 64 bit sims. Make a couple of private functions 'static'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13743 a1c6a512-1295-4272-9138-f99709370657
* Use a larger font cache on the targets that can afford the (quite small) RAM ↵Linus Nielsen Feltzing2007-03-05
| | | | | | usage git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12620 a1c6a512-1295-4272-9138-f99709370657
* sysfont.h is only needed by devices with bitmap displays.Barry Wardell2007-01-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12042 a1c6a512-1295-4272-9138-f99709370657
* Make the build system create a sysfont.h which includes font information for ↵Barry Wardell2007-01-17
| | | | | | | | | the system font. Available #defines are: SYSFONT_NAME, SYSFONT_FACENAME, SYSFONT_WIDTH, SYSFONT_HEIGHT, SYSFONT_SIZE, SYSFONT_ASCENT, SYSFONT_DESCENT, SYSFONT_FIRST_CHAR, SYSFONT_LAST_CHAR, SYSFONT_DEFAULT_CHAR, SYSFONT_PROPORTIONAL, SYSFONT_COPYRIGHT, SYSFONT_BITS_SIZE. Also fix a small bug in the iPod bootloader printf() code and use printf() for PortalPlayer bootloaders too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12041 a1c6a512-1295-4272-9138-f99709370657
* waiting is over: initial unicode commitMarcoen Hirschberg2005-12-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
* Increased maximum file size for models with LCD height larger than 64 toDaniel Stenberg2005-08-03
| | | | | | | | 10000 bytes. Also adjusted the buildzip script to dynamically figure out the maximum buffer size for the particular build that the zip is made for. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7280 a1c6a512-1295-4272-9138-f99709370657
* moved lcd_getstringsize into font.cChristian Gmeiner2005-04-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6321 a1c6a512-1295-4272-9138-f99709370657
* font format documentation updated, obsolete definitions removedJörg Hohensohn2004-08-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5020 a1c6a512-1295-4272-9138-f99709370657
* By reducing the font buffer to 4000 bytes from 9000, we get 5000 fresh bytesDaniel Stenberg2004-08-27
| | | | | | | | to buffer mp3 with! Only 3 out of 44 fonts that fit within 9000 are bigger than 4000, leaving us with 41 fonts that fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5019 a1c6a512-1295-4272-9138-f99709370657
* Fixed pointer types & struct fontJens Arnold2004-08-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5016 a1c6a512-1295-4272-9138-f99709370657
* New font format (already rotated) saves code, space and time. On the ↵Jörg Hohensohn2004-08-26
| | | | | | downside this new format is incompatible, so get the new fonts, too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5015 a1c6a512-1295-4272-9138-f99709370657
* Const policed pointer arguments to functions, part 1Jens Arnold2004-08-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4995 a1c6a512-1295-4272-9138-f99709370657
* Added multiple inclusion protectionBjörn Stenberg2003-06-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3767 a1c6a512-1295-4272-9138-f99709370657
* Include File Cleanup And Move-Around Party 2003.Daniel Stenberg2003-02-07
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3213 a1c6a512-1295-4272-9138-f99709370657