Jump to content
Sign in to follow this  
pcoder

TDirect2DFont.GetHandle fontsize?

Recommended Posts

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

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 by pcoder

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×