[UWP]使用Direct2D进行DirectWrite渲染;削减字形 [英] [UWP]DirectWrite rendering with Direct2D; cut glyphs

查看:117
本文介绍了[UWP]使用Direct2D进行DirectWrite渲染;削减字形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,我试图通过使用Direct2D的DrawTextLayout函数渲染DirectWrite布局,但问题是我的字形渲染都是不均匀和丑陋的,即使在更大的尺寸,并切入点在较小的尺寸上变得难以理解,
我不能为我的生活找出原因。



I使用16左右的DIP,即便如此(这应该是标准的12pt大小),文字是残暴的。我猜这是我正在挑选字体的大小问题 - 在这种情况下,我想知道将点或像素转换为
"DIP"的正确方法 - 或者这是我用于渲染器的渲染设置 - 在这种情况下,我想知道我应该更改哪些设置,因为我现在已经将所有设置都设置为默认值。


提前谢谢。

解决方案

我更喜欢UWP的Win2D nuget包了



https://microsoft.github.io/Win2D/html/QuickStart.htm


As the title says, I'm trying to render a DirectWrite layout by using Direct2D's DrawTextLayout function, but the problem is that my glyphs are rendered all uneven and ugly, even at bigger sizes, and cut to the point of becoming unreadable at smaller sizes, and I can't for the life of me figure out why this is.

I'm using 16 or so DIP and even then (this should be a standard 12pt size), the text is atrocious. I'm guessing this is a problem with the size I'm picking for the font - in which case, I'd like to know the correct way to convert points or pixels into those "DIP"s - or it's something about the render settings I'm using for the renderer - in which case I'd love to know what settings I should change, seeing as I have everything set to default right now.

Thank you in advance.

解决方案

I prefer the Win2D nuget package for UWP

https://microsoft.github.io/Win2D/html/QuickStart.htm


这篇关于[UWP]使用Direct2D进行DirectWrite渲染;削减字形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆