Kaydet (Commit) e8d48dd7 authored tarafından Khaled Hosny's avatar Khaled Hosny

Fixup 23c51251

It was asserting for me at startup on Windows.

Change-Id: I81d7b0dd58fd912c5fc255c3a7fa0878e841737e
Reviewed-on: https://gerrit.libreoffice.org/54160Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst ab03a097
......@@ -997,6 +997,7 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFa
const RawFontData aHheaRawData(getHDC(), nHheaTag);
const RawFontData aOS2RawData(getHDC(), nOS2Tag);
mpWinFontEntry[nFallbackLevel]->SetHDC(getHDC());
rxFontMetric->SetMinKashida(mpWinFontEntry[nFallbackLevel]->GetKashidaWidth());
// get the font metric
......
......@@ -342,7 +342,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
hb_font_t* WinFontInstance::ImplInitHbFont()
{
assert(m_hDC);
m_hFont = static_cast<HFONT>(GetCurrentObject(m_hDC, OBJ_FONT));
assert(m_hFont);
hb_font_t* pHbFont = InitHbFont(hb_face_create_for_tables(getFontTable, m_hFont, nullptr));
// Calculate the AverageWidthFactor, see LogicalFontInstance::GetScale().
......@@ -378,6 +378,7 @@ void WinFontInstance::SetHDC(const HDC hDC)
return;
ReleaseHbFont();
m_hDC = hDC;
m_hFont = static_cast<HFONT>(GetCurrentObject(m_hDC, OBJ_FONT));
}
bool WinSalGraphics::CacheGlyphs(const GenericSalLayout& rLayout)
......
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