]> git.tdb.fi Git - ttf2png.git/log
ttf2png.git
3 years agoBump version to 2.0 master
Mikko Rasa [Wed, 31 Mar 2021 11:27:05 +0000 (14:27 +0300)]
Bump version to 2.0

3 years agoReject reversed code point ranges
Mikko Rasa [Wed, 31 Mar 2021 11:25:42 +0000 (14:25 +0300)]
Reject reversed code point ranges

3 years agoAccept 0 as a valid code point
Mikko Rasa [Wed, 31 Mar 2021 11:16:13 +0000 (14:16 +0300)]
Accept 0 as a valid code point

I don't expect any fonts to have an actual glyph there, but it is
technically valid.

3 years agoUse pkg-config to get freetype compile info
Mikko Rasa [Wed, 31 Mar 2021 11:15:47 +0000 (14:15 +0300)]
Use pkg-config to get freetype compile info

3 years agoAdd the -b option to help text
Mikko Rasa [Wed, 31 Mar 2021 11:05:13 +0000 (14:05 +0300)]
Add the -b option to help text

5 years agoUse the bool type for the used glyph array in render_packed
Mikko Rasa [Sat, 5 May 2018 19:32:02 +0000 (22:32 +0300)]
Use the bool type for the used glyph array in render_packed

Also change the typedef to unsigned char to save space.

5 years agoRework the definition file format
Mikko Rasa [Sat, 5 May 2018 19:27:22 +0000 (22:27 +0300)]
Rework the definition file format

Distance fields threw off the metrics because the field extends past the
actual glyph area.  The definitions are now split to abstract metrics and
glyph images to allow acccurate metrics to be obtained.  A mapping from
code points to glyphs was also added to allow later support for glyphs
without a dedicated code point such as ligatures.

5 years agoRefactor image initialization
Mikko Rasa [Sat, 5 May 2018 12:47:17 +0000 (15:47 +0300)]
Refactor image initialization

5 years agoPerform color inversion and npot rounding in save_png
Mikko Rasa [Sat, 5 May 2018 12:36:11 +0000 (15:36 +0300)]
Perform color inversion and npot rounding in save_png

5 years agoUpdate copyright at the top of the .c file
Mikko Rasa [Fri, 4 May 2018 21:08:11 +0000 (00:08 +0300)]
Update copyright at the top of the .c file

5 years agoFix incorrect pointer initialization
Mikko Rasa [Fri, 4 May 2018 21:07:39 +0000 (00:07 +0300)]
Fix incorrect pointer initialization

5 years agoAdd an option to control distance field border zone
Mikko Rasa [Fri, 4 May 2018 21:07:23 +0000 (00:07 +0300)]
Add an option to control distance field border zone

5 years agoSlightly refactor how the font size is set
Mikko Rasa [Fri, 4 May 2018 21:06:54 +0000 (00:06 +0300)]
Slightly refactor how the font size is set

5 years agoImprove distance field accuracy
Mikko Rasa [Fri, 4 May 2018 19:15:07 +0000 (22:15 +0300)]
Improve distance field accuracy

A better initial guess allows the square root function to deal with
larger numbers.

5 years agoUse euclidean distance instead of manhattan distance
Mikko Rasa [Fri, 4 May 2018 17:47:41 +0000 (20:47 +0300)]
Use euclidean distance instead of manhattan distance

This turned out to be surprisingly efficient and compact once I put some
thought into it.

5 years agoAllocate slightly larger image when creating packed texture
Mikko Rasa [Thu, 3 May 2018 17:19:10 +0000 (20:19 +0300)]
Allocate slightly larger image when creating packed texture

When rendering a very small number of glyphs the packing imperfections
become more pronounced, overflowing the allocated area more easily.

5 years agoAdd support for generating distance field textures
Mikko Rasa [Thu, 3 May 2018 16:24:59 +0000 (19:24 +0300)]
Add support for generating distance field textures

5 years agoRound kerning values to nearest integer rather than down
Mikko Rasa [Thu, 3 May 2018 16:18:31 +0000 (19:18 +0300)]
Round kerning values to nearest integer rather than down

5 years agoUse unsigned char for image data
Mikko Rasa [Thu, 3 May 2018 11:01:59 +0000 (14:01 +0300)]
Use unsigned char for image data

5 years agoFix a memory leak
Mikko Rasa [Thu, 3 May 2018 10:19:29 +0000 (13:19 +0300)]
Fix a memory leak

5 years agoFix scaling of font ascent and descent
Mikko Rasa [Thu, 3 May 2018 10:06:26 +0000 (13:06 +0300)]
Fix scaling of font ascent and descent

Descent value is often negative and right-shifting a negative value is
implementation-defined.  Best to avoid it.

Also round descent down instead of up.

5 years agoSupport monochrome bitmaps
Mikko Rasa [Thu, 3 May 2018 09:24:14 +0000 (12:24 +0300)]
Support monochrome bitmaps

5 years agoRefactor glyph bitmap copying into a separate function
Mikko Rasa [Thu, 3 May 2018 09:04:54 +0000 (12:04 +0300)]
Refactor glyph bitmap copying into a separate function

Also write it in a way that doesn't duplicate the loops.

6 years agoAdd a flag for non-power-of-two images
Mikko Rasa [Sat, 14 Apr 2018 14:20:02 +0000 (17:20 +0300)]
Add a flag for non-power-of-two images

6 years agoAdd a default code point range if none were specified
Mikko Rasa [Sat, 14 Apr 2018 14:17:30 +0000 (17:17 +0300)]
Add a default code point range if none were specified

6 years agoMake sure there code point ranges are in order
Mikko Rasa [Sat, 14 Apr 2018 14:12:01 +0000 (17:12 +0300)]
Make sure there code point ranges are in order

And that there are no overlapping ranges.  The grid rendering logic
depends on being able to determine the total range of code points from
the first and last converted glyph.

6 years agoSupport multiple disjoint code point ranges
Mikko Rasa [Sat, 14 Apr 2018 13:45:10 +0000 (16:45 +0300)]
Support multiple disjoint code point ranges

6 years agoImprove glyph details output with -vv
Mikko Rasa [Sat, 14 Apr 2018 13:29:08 +0000 (16:29 +0300)]
Improve glyph details output with -vv

The code point is now printed in the standard Unicode syntax.  A UTF-8
encoded character is also printed when applicable.

6 years agoDon't crash if no glyphs were found
Mikko Rasa [Sat, 14 Apr 2018 13:28:50 +0000 (16:28 +0300)]
Don't crash if no glyphs were found

6 years agoSupport more ways of specifying code point ranges
Mikko Rasa [Sat, 14 Apr 2018 13:28:19 +0000 (16:28 +0300)]
Support more ways of specifying code point ranges

6 years agoImprove type usage
Mikko Rasa [Sat, 14 Apr 2018 12:01:41 +0000 (15:01 +0300)]
Improve type usage

Use unsigned for numbers for which negative values do not make sense.
Add a typedef for bool to better annotate the intended use of flag
variables.

6 years agoRefactor option processing
Mikko Rasa [Sat, 14 Apr 2018 11:51:55 +0000 (14:51 +0300)]
Refactor option processing

Conversion code was moved to utility functions.  Numeric values are now
checked for being in the proper range and not having garbage at the end.

6 years agoMinor polishing of usage message and readme
Mikko Rasa [Sat, 14 Apr 2018 10:40:46 +0000 (13:40 +0300)]
Minor polishing of usage message and readme

6 years agoEliminate alignment from variable declarations
Mikko Rasa [Sat, 14 Apr 2018 10:29:19 +0000 (13:29 +0300)]
Eliminate alignment from variable declarations

It causes trouble when adding variables with longer types than existing
ones.  Also reformat an incorrectly wrapped comment.

6 years agoUpdate the Makefile to look for libpng16
Mikko Rasa [Sat, 14 Apr 2018 09:20:52 +0000 (12:20 +0300)]
Update the Makefile to look for libpng16

Libpng12 is quite old and 16 has been the default in Debian stable since
last year.

8 years agoBump version to 1.1
Mikko Rasa [Tue, 14 Jul 2015 10:10:51 +0000 (13:10 +0300)]
Bump version to 1.1

8 years agoMake margin and padding in packed mode controllable
Mikko Rasa [Tue, 14 Jul 2015 10:08:35 +0000 (13:08 +0300)]
Make margin and padding in packed mode controllable

8 years agoAvoid warning about signed/unsigend mismatch
Mikko Rasa [Tue, 14 Jul 2015 09:59:33 +0000 (12:59 +0300)]
Avoid warning about signed/unsigend mismatch

FreeType recently changed some fields in FT_Bitmap to unsigned.

10 years agoGenerate only as tall image as needed in sequantial grid mode
Mikko Rasa [Thu, 28 Nov 2013 10:11:11 +0000 (12:11 +0200)]
Generate only as tall image as needed in sequantial grid mode

11 years agoBump version to 1.0 1.0
Mikko Rasa [Fri, 23 Nov 2012 21:53:04 +0000 (23:53 +0200)]
Bump version to 1.0

11 years agoMakefile improvements
Mikko Rasa [Fri, 23 Nov 2012 21:51:21 +0000 (23:51 +0200)]
Makefile improvements

11 years agoEnable compiler optimizations and fix some warnings
Mikko Rasa [Fri, 23 Nov 2012 21:40:50 +0000 (23:40 +0200)]
Enable compiler optimizations and fix some warnings

11 years agoMinor cleanup
Mikko Rasa [Fri, 23 Nov 2012 20:29:11 +0000 (22:29 +0200)]
Minor cleanup

11 years agoFix some memory errors
Mikko Rasa [Fri, 23 Nov 2012 20:27:48 +0000 (22:27 +0200)]
Fix some memory errors

11 years agoCorrectly interpret a single number given to -c
Mikko Rasa [Fri, 23 Nov 2012 19:23:52 +0000 (21:23 +0200)]
Correctly interpret a single number given to -c

11 years agoUse stricter warnings and make the code compile with them
Mikko Rasa [Fri, 23 Nov 2012 18:12:41 +0000 (20:12 +0200)]
Use stricter warnings and make the code compile with them

11 years agoInclude kerning information in definition file
Mikko Rasa [Fri, 23 Nov 2012 18:02:51 +0000 (20:02 +0200)]
Include kerning information in definition file

11 years agoBetter documentation
Mikko Rasa [Fri, 23 Nov 2012 17:08:17 +0000 (19:08 +0200)]
Better documentation

11 years agoEliminate some nested loops from the packing algorithm
Mikko Rasa [Fri, 23 Nov 2012 17:04:52 +0000 (19:04 +0200)]
Eliminate some nested loops from the packing algorithm

11 years agoFix the logic for determining grid range
Mikko Rasa [Fri, 23 Nov 2012 13:34:58 +0000 (15:34 +0200)]
Fix the logic for determining grid range

11 years agoImprove the packing algorithm
Mikko Rasa [Fri, 23 Nov 2012 09:45:31 +0000 (11:45 +0200)]
Improve the packing algorithm

11 years agoAdd an option to invert colors
Mikko Rasa [Fri, 23 Nov 2012 08:43:08 +0000 (10:43 +0200)]
Add an option to invert colors

11 years agoSupport non-square cells
Mikko Rasa [Fri, 23 Nov 2012 08:33:27 +0000 (10:33 +0200)]
Support non-square cells

11 years agoCode formatting fixes
Mikko Rasa [Fri, 23 Nov 2012 07:47:23 +0000 (09:47 +0200)]
Code formatting fixes

11 years agoVersion 0.3 0.3
Mikko Rasa [Sun, 2 Nov 2008 20:41:25 +0000 (22:41 +0200)]
Version 0.3

11 years agoVersion 0.2.2 0.2.2
Mikko Rasa [Wed, 28 Nov 2007 12:40:05 +0000 (14:40 +0200)]
Version 0.2.2

11 years agoVersion 0.2.1 0.2.1
Mikko Rasa [Mon, 20 Nov 2006 01:12:30 +0000 (03:12 +0200)]
Version 0.2.1

11 years agoVersion 0.2 0.2
Mikko Rasa [Tue, 19 Sep 2006 11:44:49 +0000 (14:44 +0300)]
Version 0.2

11 years agoVersion 0.1.1 0.1.1
Mikko Rasa [Thu, 28 Oct 2004 19:23:40 +0000 (22:23 +0300)]
Version 0.1.1

11 years agoVersion 0.1 0.1
Mikko Rasa [Fri, 15 Oct 2004 10:52:29 +0000 (13:52 +0300)]
Version 0.1