As it looks like I might finally have some spare time coming up, I thought I'd start working on my (AllegroGL) projects again. However, I need a decent text rendering library to proceed.
I need at least:
printf() equivalent functionality.
Text justification.
Unicode (UTF-8) support.
TTF support.
</li>
AllegroGL's built-in text functionality doesn't handle justification (and I haven't managed to wrangle it to do Unicode either) and Glyph keeper had no official support for OpenGL last I checked (which is right before it was left to bit rot). So what else is out there?
[EDIT]
Added the cross-platform requirement I forgot earlier.
Fudgefont if your on linux, I had trouble with building on mingw. I don't know if it meets all of your requirements but must be worth a look.
And of course, it comes with a non-make own build system and Yet Another Dependency (and LF endings in the Readmes). sigh
I'll try to check it out and report back. 
[EDIT]
Nope. No dice. Didn't manage to compile it.
Nope. No dice. Didn't manage to compile it.
Well, that makes me feel better then.
It's a shame because it looks really useful, I did mean to write a makefile, someone must really hate make to use python as a build system which is only likely to work on systems where make would have worked anyway ...
Gnolam:
Fix GlyphKeeper, or FreeType in OpenLayer for us.
Fix GlyphKeeper
I have neither the time nor will to fix a library whose internals I'm unfamiliar with.
FreeType in OpenLayer
I don't use it.
You could just rip the text rendering methods if you wanted...
well I fudged
a makefile just to link the examples locally but with mixed results 
...oh, I had to change include <> to include "" and add END_OF_MAIN() to examples 2 and 3
| 1 | # make gl=1 == build allegrogl examples |
| 2 | |
| 3 | cc=gcc |
| 4 | CFLAGS=-Wall -Isrc -fomit-frame-pointer -O2 -ffast-math -funroll-loops |
| 5 | |
| 6 | OBJDIR = build/shared/release |
| 7 | |
| 8 | |
| 9 | ifdef MINGDIR |
| 10 | |
| 11 | ifdef gl |
| 12 | CFLAGS=-DALLEGROGL |
| 13 | LDFLAGS=-lagl -lopengl32 -lglu32 |
| 14 | suffix=_gl |
| 15 | endif |
| 16 | |
| 17 | LDFLAGS+=-lm -mwindows -Wl,--subsystem,windows -lalleg -luser32 -lgdi32 -lfreetype |
| 18 | ext=.exe |
| 19 | else |
| 20 | |
| 21 | ifdef gl |
| 22 | CFLAGS=-DALLEGROGL |
| 23 | LDFLAGS=-lagl -lGL -lGLU |
| 24 | endif |
| 25 | |
| 26 | LDFLAGS+=-lm `allegro-config --libs` `freetype-config --libs` |
| 27 | CFLAGS+=`freetype-config --cflags` |
| 28 | endif |
| 29 | |
| 30 | FILES = example1.c example2.c example3.c |
| 31 | EXBINS = $(addprefix src/, $(addsuffix $(suffix)$(ext), $(basename $(FILES)))) |
| 32 | EXOBJS = $(addprefix $(OBJDIR)/, $(addsuffix $(suffix).o, $(basename $(FILES)))) |
| 33 | LIB = $(OBJDIR)/fudgefont.o |
| 34 | |
| 35 | all: library examples |
| 36 | |
| 37 | library: $(LIB) |
| 38 | |
| 39 | examples: $(EXBINS) |
| 40 | |
| 41 | $(BINARY) : $(OBJS) |
| 42 | $(cc) -o $(BINARY) $(OBJS) $(LDFLAGS) |
| 43 | |
| 44 | src/example%$(ext) : $(OBJDIR)/example%.o |
| 45 | $(cc) -o $@ $(LIB) $< $(LDFLAGS) |
| 46 | |
| 47 | $(EXBINS) : $(EXOBJS) |
| 48 | |
| 49 | |
| 50 | $(OBJDIR)/%$(suffix).o: src/%.c |
| 51 | $(cc) $(CFLAGS) -Isrc -c $< -o $@ |
| 52 | |
| 53 | clean: |
| 54 | del $(OBJDIR)/*.* |
| 55 |