Commit Graph

12 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt 3020acf994 ZmFont: Store character padding in font file
The size/variant specific character padding should be stored with the font data.
Modify the FontBitmapHeader accordingly and introduce a version field in the FontFileHeader
so we are able to check we have a font file with the right structure associated with that version.

The version field is set to 1 in this changeset.
2021-04-25 23:13:21 +02:00
Peter Keresztes Schmidt 0c939f45dd ZmFont: Rework/modernize API 2021-04-25 23:13:21 +02:00
Isaac Connor 467baf8a95 fix bogus font validation 2021-04-20 11:37:57 -04:00
Isaac Connor ab2e468322 Fix resource leak on failure to load font 2021-02-06 20:11:38 -05:00
Peter Keresztes Schmidt 0dbc39ee25 Cleanup and reorganize includes
With this commit a unified structure for includes is introduced.
The general rules:
 * Only include what you need
 * Include wherever possible in the cpp and forward-declare in the header

 The includes are sorted in a local to global fashion. This means for the include order:
  0. If cpp file: The corresponding h file and an empty line
  1. Includes from the project sorted alphabetically
  2. System/library includes sorted alphabetically
  3. Conditional includes
2021-02-04 18:02:01 +01:00
Peter Keresztes Schmidt 5a57efdfe2 Replace deprecated C header includes with the C++ ones. 2021-02-04 05:39:03 +01:00
Isaac Connor 330327ded0 Improve code readability. Use a define for header size 2020-12-03 16:21:18 -05:00
hax0kartik 1ec13f3d06 Free font->data only when font itself is valid 2020-12-02 09:44:49 +05:30
hax0kartik d290ffc1b3 Set individual rgb components instead of memset which is wrong 2020-11-30 17:57:59 +05:30
hax0kartik 890a52605f Satisfy cpplint 2020-11-29 10:25:06 +05:30
hax0kartik 0a7b7b9661 Bound check values 2020-11-28 19:44:45 +05:30
hax0kartik 528699f942 Use ctzll + new font format for improving drawing speed 2020-11-28 18:46:20 +05:30