src/gui/text/qfontdatabase_win.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
  1109         QFileInfo fileinfo(fnt->fileName);
  1109         QFileInfo fileinfo(fnt->fileName);
  1110         fnt->fileName = fileinfo.absoluteFilePath();
  1110         fnt->fileName = fileinfo.absoluteFilePath();
  1111         if (AddFontResource((LPCWSTR)fnt->fileName.utf16()) == 0)
  1111         if (AddFontResource((LPCWSTR)fnt->fileName.utf16()) == 0)
  1112             return;
  1112             return;
  1113 #else
  1113 #else
  1114         // supported from 2000 on, so no need to deal with the *A variant
       
  1115         PtrAddFontResourceExW ptrAddFontResourceExW = (PtrAddFontResourceExW)QLibrary::resolve(QLatin1String("gdi32"),
  1114         PtrAddFontResourceExW ptrAddFontResourceExW = (PtrAddFontResourceExW)QLibrary::resolve(QLatin1String("gdi32"),
  1116                                                                                                "AddFontResourceExW");
  1115                                                                                                "AddFontResourceExW");
  1117         if (!ptrAddFontResourceExW
  1116         if (!ptrAddFontResourceExW
  1118             || ptrAddFontResourceExW((wchar_t*)fnt->fileName.utf16(), FR_PRIVATE, 0) == 0)
  1117             || ptrAddFontResourceExW((wchar_t*)fnt->fileName.utf16(), FR_PRIVATE, 0) == 0)
  1119             return;
  1118             return;