gpt4 book ai didi

windows-8 - 如何使用在任何分辨率下都看起来不错的字体设计 Metro UI?

转载 作者:行者123 更新时间:2023-12-05 01:10:23 30 4
gpt4 key购买 nike

当人们看着 Guidelines for fonts ,我们看到字体是以磅为单位指定的。一个点是 1/72 英寸,所以它是一个绝对度量:一个 10 点的字符应该在任何分辨率的任何显示器上以完全相同的绝对大小显示。这对我来说很有意义,因为我希望能够以相同的大小阅读文本,无论是在 10 英寸平板电脑还是 23 英寸显示器上。换句话说,我希望我的文本在平板电脑上可读,但我不希望它在显示器上太大。

另一方面,我可以理解某些 UI 元素可以以像素为单位指定,如 Page layout guidelines .

但是,在 XAML 中,字体大小以像素为单位指定,这取决于设备(据我所知)。因此,字体大小在分辨率更高的显示器上看起来会很小!看到这个 post更多细节。该帖子中的答案是“这样,您将获得一致的字体大小”。当分辨率发生变化时,我看不到如何获得一致的尺寸?!?

我应该根据设备的分辨率以编程方式加载不同的字体大小吗?
我看到here Windows 会根据 DPI 进行一些缩放调整。这种调整是否足以让我的用户在平板电脑和 20 英寸显示器上获得出色的体验(或者我应该根据设备分辨率以编程方式更改字体大小)吗?

额外问题:当软件工具不使用点时,为什么字体指南使用点编写(例如,他们在想什么)?

最佳答案

this blog post 中广泛涵盖了“他们在想什么”。 .

您还将看到描述的像素密度缩放是如何自动进行的:

For those who buy these higher pixel-density screens, we want to ensure that their apps, text, and images will look both beautiful and usable on these devices. Early on, we explored continuous scaling to the pixel density, which would maintain the size of an object in inches, but we found that most apps use bitmap images, which could look blurry when scaled up or down to an unpredictable size. Instead, Windows 8 uses predictable scale percentages to ensure that Windows will look great on these devices. There are three scale percentages in Windows 8:


100% when no scaling is applied
140% for HD tablets
180% for quad-XGA tablets

The percentages are optimized for real devices in the ecosystem. 140% and 180% may seem like odd scale percentage choices, but they make sense when you think about how this will work on real hardware.

For example, the 140% scale is optimized for 1920x1080 HD tablets, which has 140% of the baseline tablet resolution of 1366x768. These optimized scale factors maintain consistent layouts between the baseline tablet and the HD tablet, because the effective resolution is the same on the two devices. Each scale percentage was chosen to ensure that a layout that was designed for 100% 1366x768 tablets has content that is the same physical size and the same layout on 140% HD tablets or 180% quad-XGA tablets.



enter image description here

关于windows-8 - 如何使用在任何分辨率下都看起来不错的字体设计 Metro UI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15081221/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com