Aric Stewart aric@codeweavers.com writes:
{
FontSubst *subst = HeapAlloc(GetProcessHeap(), 0, sizeof(*subst));subst->from.name = strdupW(english_family);subst->from.charset = -1;subst->to.name = strdupW(family_name);subst->to.charset = -1;add_font_subst(&font_subst_list, subst, 0);
if (!array_size){array_size = 5;vertical_fonts = HeapAlloc(GetProcessHeap(), 0, array_size * sizeof(WCHAR*));}if (vertical_count+1 >= array_size){array_size *= 2;vertical_fonts = HeapReAlloc(GetProcessHeap(), 0, vertical_fonts, array_size * sizeof(WCHAR*));}vertical_fonts[vertical_count] = strdupW(buffer);vertical_count++;
That seems overly complicated. We already put the fonts in a list, it shouldn't be hard to reorder it, or use a temp list for vertical fonts, or something like that.