diff --git a/ui_attrstr.h b/ui_attrstr.h index a30302e0..e2f1f8b3 100644 --- a/ui_attrstr.h +++ b/ui_attrstr.h @@ -27,7 +27,7 @@ typedef struct uiAttributedString uiAttributedString; _UI_ENUM(uiAttribute) { // uiAttributeFamily changes the font family of the text it is // applied to. Use the Family field of uiAttributeSpec. - // TODO case-sensitive? + // TODO this is case-insensitive on all platforms; codify this uiAttributeFamily, // uiAttributeSize changes the size of the text it is applied to, // in typographical points. Use the Double field of diff --git a/windows/attrstr.cpp b/windows/attrstr.cpp index ca805237..c87804b5 100644 --- a/windows/attrstr.cpp +++ b/windows/attrstr.cpp @@ -61,8 +61,9 @@ static uiForEach processAttribute(const uiAttributedString *s, const uiAttribute ostart = start; oend = end; - start = attrstrUTF8ToUTF16(s, start); - end = attrstrUTF8ToUTF16(s, end); + // TODO fix const correctness + start = attrstrUTF8ToUTF16((uiAttributedString *) s, start); + end = attrstrUTF8ToUTF16((uiAttributedString *) s, end); range.startPosition = start; range.length = end - start; switch (spec->Type) { diff --git a/windows/drawtext.cpp b/windows/drawtext.cpp index 59d64097..84a8874e 100644 --- a/windows/drawtext.cpp +++ b/windows/drawtext.cpp @@ -381,7 +381,7 @@ public: return E_UNEXPECTED; } - virtual HRESULT DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, const DWRITE_UNDERLINE *underline, IUnknown *clientDrawingEffect) + virtual HRESULT STDMETHODCALLTYPE DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, const DWRITE_UNDERLINE *underline, IUnknown *clientDrawingEffect) { textDrawingEffect *t = (textDrawingEffect *) clientDrawingEffect; ID2D1SolidColorBrush *brush;