加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-8 – 如何使用在任何分辨率上都很好的字体设计Metro UI

发布时间:2020-12-13 20:29:29 所属栏目:Windows 来源:网络整理
导读:当我们查看 Guidelines for fonts时,我们看到字体是以点数指定的.一个点是1/72英寸所以它是一个绝对的度量:在任何分辨率的任何显示器上,10点字符应该以完全相同的绝对大小显示.这对我来说是有意义的,因为我希望能够以相同的大小阅读文本 – 无论是平板电脑1
当我们查看 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 1920×1080 HD tablets,which has 140% of the baseline tablet resolution of 1366×768. 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% 1366×768 tablets has content that is the same physical size and the same layout on 140% HD tablets or 180% quad-XGA tablets.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读