Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 DirectWrite 获取文本范围? 例如,.Net 将其作为FormattedText 类的一部分提供。
以您想要的方式创建IDWriteTextLayout设置,然后使用 和 等方法DetermineMinWidth()来GetMetrics()检索布局计算。
IDWriteTextLayout
DetermineMinWidth()
GetMetrics()