pcoder 4 Posted September 19, 2023 By API docs, DWriteFactory.CreateTextFormat() expects device-independent pixels (DIP), but the call seems to get physical pixels: MulDiv(Size, FPixelsPerInch, 72). An issue or not? Share this post Link to post
pcoder 4 Posted December 3, 2023 (edited) Answering to myself: This is OK for (TDirect2DCanvas.RenderTarget.dpi = 96) only, ie (pixels = DIPs). dpi 96 (regardless of screen dpi and font.dpi) allows clients to pass pixel coordinates to all Direct2D-functions which want DIPs. This is GDI-compatible, so clients must provide final pixel values (dependent on screen (or other) DPI). Edited December 3, 2023 by pcoder Share this post Link to post