問題タブ [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:) の呼び出しを使用できません。
ありがとう :)