61 |
61 |
62 // Render text onto a surface |
62 // Render text onto a surface |
63 TTF_Font *font = asc_font_load(text->font); |
63 TTF_Font *font = asc_font_load(text->font); |
64 if (font == NULL) { |
64 if (font == NULL) { |
65 // cannot load font - hide the text node to avoid errors when trying to draw |
65 // cannot load font - hide the text node to avoid errors when trying to draw |
66 asc_set_flag(node->flags, ASC_SCENE_NODE_HIDDEN); |
66 asc_scene_node_hide(node); |
67 return; |
67 return; |
68 } |
68 } |
69 static TTF_HorizontalAlignment alignments[] = { |
69 static TTF_HorizontalAlignment alignments[] = { |
70 TTF_HORIZONTAL_ALIGN_LEFT, |
70 TTF_HORIZONTAL_ALIGN_LEFT, |
71 TTF_HORIZONTAL_ALIGN_CENTER, |
71 TTF_HORIZONTAL_ALIGN_CENTER, |