问题标签 [uifontweighttrait]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios7 - UIFontWeightTrait and UIFontDescriptorFamilyAttribute Ignored when creating UIFont from UIFontDescriptor
Given the following code and a device running iOS 7.1 or later:
I would expect the value of shouldBeAnUltraLightFont
to be an instance of HelveticaNeue-UltraLight, but instead it is:
I am following the Apple documentation as far as I understand it. Why is the font family and font weight information completely ignored?
Things I’ve Tried
- I've tried other family names like Helvetica, Avenir, etc.
- I've tried other font weights in the valid range from -1 to 1, in increments of 0.25
Regardless of these changes, the font returned is always a vanilla instance of Helvetica at normal weight.
ios - HelveticaNeue 和 HelveticaNeue-Light 之间权重的字体或更改 HelveticaNeue 权重的方法
我试图尽可能地模仿 iOS 默认系统键盘的字体。显然,家庭是HelveticaNeue
但重量既不是HelveticaNeue-Light
(太轻)也不是HelveticaNeue
(太重)。
我的研究表明,默认系统 iOS 键盘使用一种名为 Dynamic Type with Optical scaling 的东西。这对第三方开发者(Apple 之外)可用吗?如果没有,我该如何模仿默认键盘的 Helvetica Neue 重量?
ios - iOS - 是否可以制作 UIFont SystemFont Italic 和 Thin(不使用 fontWithName :)?
我的应用程序仅使用系统字体,并且我正在使用功能创建它们 -
如何使用权重 UIFontWeightThin 使系统字体斜体?
我不能使用对特定系列字体 (fontWithName:) 的调用,因为我希望它只是系统字体。
谢谢 :)