Commit ce426d6a authored by Paul TBBle Hampson's avatar Paul TBBle Hampson Committed by Alexandre Julliard

gdi32: Don't add system_links entries for substituted fonts.

When a Font is looked up in the FontLinks table, they have already been normalised by FontSubstitutes. So no need to store system_links entries for fonts that appear as keys in the FontSubstitutes list.
parent 8a4b7788
...@@ -1652,9 +1652,15 @@ static BOOL init_system_links(void) ...@@ -1652,9 +1652,15 @@ static BOOL init_system_links(void)
while(RegEnumValueW(hkey, index++, value, &val_len, NULL, &type, (LPBYTE)data, &data_len) == ERROR_SUCCESS) while(RegEnumValueW(hkey, index++, value, &val_len, NULL, &type, (LPBYTE)data, &data_len) == ERROR_SUCCESS)
{ {
memset(&fs, 0, sizeof(fs)); memset(&fs, 0, sizeof(fs));
font_link = HeapAlloc(GetProcessHeap(), 0, sizeof(*font_link));
psub = get_font_subst(&font_subst_list, value, -1); psub = get_font_subst(&font_subst_list, value, -1);
font_link->font_name = (psub)? strdupW(psub->to.name) : strdupW(value); /* Don't store fonts that are only substitutes for other fonts */
if(psub)
{
TRACE("%s: SystemLink entry for substituted font, ignoring\n", debugstr_w(value));
continue;
}
font_link = HeapAlloc(GetProcessHeap(), 0, sizeof(*font_link));
font_link->font_name = strdupW(value);
list_init(&font_link->links); list_init(&font_link->links);
for(entry = data; (char*)entry < (char*)data + data_len && *entry != 0; entry = next) for(entry = data; (char*)entry < (char*)data + data_len && *entry != 0; entry = next)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment