More TODO completion in the drawtext example.

This commit is contained in:
Pietro Gagliardi 2017-02-11 14:22:23 -05:00
parent 67949d79aa
commit a014eb27e6
1 changed files with 8 additions and 2 deletions

View File

@ -193,10 +193,16 @@ static void checkboxChecked(uiCheckbox *c, void *data)
static void changeFont(uiFontButton *b, void *data)
{
// TODO free old font name
if (defaultFont.Family != fontFamily)
uiFreeText(defaultFont.Family);
// TODO rename defaultFont
uiFontButtonFont(fontButton, &defaultFont);
// TODO dump the new font
printf("{\n\tfamily: %s\n\tsize: %g\n\tweight: %d\n\titalic: %d\n\tstretch: %d\n}\n",
defaultFont.Family,
defaultFont.Size,
(int) (defaultFont.Weight),
(int) (defaultFont.Italic),
(int) (defaultFont.Stretch));
redraw();
}