Fixed #560 loading multiple fonts
This commit is contained in:
parent
054136075c
commit
5fbcdd0f58
@ -12169,11 +12169,11 @@ nk_font_atlas_add(struct nk_font_atlas *atlas, const struct nk_font_config *conf
|
|||||||
atlas->config = cfg;
|
atlas->config = cfg;
|
||||||
cfg->next = 0;
|
cfg->next = 0;
|
||||||
} else {
|
} else {
|
||||||
atlas->config->next = cfg;
|
struct nk_font_config *i = atlas->config;
|
||||||
cfg->next = atlas->config;
|
while (i->next) i = i->next;
|
||||||
atlas->config = cfg;
|
i->next = cfg;
|
||||||
|
cfg->next = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allocate new font */
|
/* allocate new font */
|
||||||
font = (struct nk_font*)
|
font = (struct nk_font*)
|
||||||
atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font));
|
atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font));
|
||||||
|
Loading…
Reference in New Issue
Block a user