awtk/docs/how_to_scale_font.md
2019-03-07 15:53:59 +08:00

13 lines
403 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 如何设置字体的全局缩放比例
有时需要支持Accessibility要求对字体进行全局缩放以便实现"大字体"和"小字体"的选项。在AWTK中可以调用函数system\_info\_set\_font\_scale来实现。
```
system_info_set_font_scale(system_info(), font_scale);
```
font\_scale的取值
* 1 表示正常大小。
* 大于1 表示放大。
* 小于1 表示缩小。