diff --git a/windows/attrstr.cpp b/windows/attrstr.cpp index 8f5e0adf..be23961e 100644 --- a/windows/attrstr.cpp +++ b/windows/attrstr.cpp @@ -40,7 +40,7 @@ static void ensureEffectsInRange(struct foreachParams *p, size_t start, size_t e } } -static void setFeaturesInRange(struct foreachParams *p, size_t start, size_t end, uiOpenTypeFeatures *otf) +static void setFeaturesInRange(struct foreachParams *p, size_t start, size_t end, const uiOpenTypeFeatures *otf) { IDWriteTypography *dt; size_t i; @@ -89,7 +89,7 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t range.length = end - start; switch (spec->Type) { case uiAttributeFamily: - wfamily = toUTF16((char *) (spec->Value)); + wfamily = toUTF16(spec->Family); hr = p->layout->SetFontFamilyName(wfamily, range); if (hr != S_OK) logHRESULT(L"error applying family name attribute", hr); @@ -196,7 +196,7 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t } break; case uiAttributeFeatures: - setFeaturesInRange(p, start, end, (uiOpenTypeFeatures *) (spec->Value)); + setFeaturesInRange(p, start, end, spec->Features); break; default: // TODO complain diff --git a/windows/opentype.cpp b/windows/opentype.cpp index b27b7d7a..0275d916 100644 --- a/windows/opentype.cpp +++ b/windows/opentype.cpp @@ -81,7 +81,7 @@ int uiOpenTypeFeaturesEqual(const uiOpenTypeFeatures *a, const uiOpenTypeFeature return *(a->tags) == *(b->tags); } -IDWriteTypography *otfToDirectWrite(uiOpenTypeFeatures *otf) +IDWriteTypography *otfToDirectWrite(const uiOpenTypeFeatures *otf) { IDWriteTypography *dt; tagmap::const_iterator iter, end; diff --git a/windows/uipriv_windows.hpp b/windows/uipriv_windows.hpp index aa39dd07..f5adacdd 100644 --- a/windows/uipriv_windows.hpp +++ b/windows/uipriv_windows.hpp @@ -164,4 +164,4 @@ extern ID2D1DCRenderTarget *makeHDCRenderTarget(HDC dc, RECT *r); extern void fontdescFromIDWriteFont(IDWriteFont *font, uiDrawFontDescriptor *uidesc); // opentype.cpp -extern IDWriteTypography *otfToDirectWrite(uiOpenTypeFeatures *otf); +extern IDWriteTypography *otfToDirectWrite(const uiOpenTypeFeatures *otf);