diff --git a/windows/drawtext.cpp b/windows/drawtext.cpp index 26b6a6ab..91c5a0c4 100644 --- a/windows/drawtext.cpp +++ b/windows/drawtext.cpp @@ -378,7 +378,9 @@ void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y) // TODO figure out if this needs to be cleaned out black = mkSolidBrush(c->rt, 0.0, 0.0, 0.0, 1.0); -#if 0 +#define renderD2D 0 +#define renderOur 1 +#if renderD2D pt.x = x; pt.y = y; // TODO D2D1_DRAW_TEXT_OPTIONS_NO_SNAP? @@ -386,7 +388,14 @@ void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y) // TODO LONGTERM when setting 8.1 as minimum (TODO verify), D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT? // TODO what is our pixel snapping setting related to the OPTIONS enum values? c->rt->DrawTextLayout(pt, tl->layout, black, D2D1_DRAW_TEXT_OPTIONS_NONE); -#else +#endif +#if renderD2D && renderOur + // draw ours semitransparent so we can check + // TODO get the actual color Charles Petzold uses and use that + black->Release(); + black = mkSolidBrush(c->rt, 1.0, 0.0, 0.0, 0.75); +#endif +#if renderOur renderer = new textRenderer(c->rt, TRUE, // TODO FALSE for no-snap? black); diff --git a/windows/fontdialog.cpp b/windows/fontdialog.cpp index d7fa91e9..6096d442 100644 --- a/windows/fontdialog.cpp +++ b/windows/fontdialog.cpp @@ -6,6 +6,8 @@ // - the Choose Font sample defaults to Regular/Italic/Bold/Bold Italic in some case (no styles?); do we? find out what the case is // - do we set initial family and style topmost as well? // - this should probably just handle IDWriteFonts +// - localization? +// - the Sample window overlaps the groupbox in a weird way (compare to the real ChooseFont() dialog) struct fontDialog { HWND hwnd;