sapphire-arches / stgl

A very hacked up version of Suckless's ST with an OpenGL renderer
MIT License
27 stars 1 forks source link

[question] support for ttf fonts? #2

Open japrogramer opened 6 years ago

japrogramer commented 6 years ago

Hello, since this terminal is opengl rendered. could support for ttf fonts be added?

sapphire-arches commented 6 years ago

The font name in config.h is a FontConfig query string and I just pass the result to Freetype2 so you should be able to point that at pretty much whatever font file you like.

japrogramer commented 6 years ago

Thank you, it looks like the st terminal source also has this setting but they have it configured differently. They don't use a separate variable for the font size.

static char font[] = "mononoki:pixelsize=16:antialias=false:autohint=false";

sapphire-arches commented 6 years ago

Yeah, because I knocked this together so quickly it's not really super clean. Setting font size using that option broke things and I haven't tracked down why that is just yet.