【问题标题】:Turning numbers into uppercase numbers with NSAttributedString/NSString and UILabel使用 NSAttributedString/NSString 和 UILabel 将数字转换为大写数字
【发布时间】:2013-03-17 19:37:59
【问题描述】:

我在这里使用的字体对于大写和小写数字具有不同的外观。这在文本编辑器和 Adob​​e 的工具中非常有效(通过将标签设置为仅大写),我认为这在 UIKit 中也可以通过 uppercaseString 方法运行字符串,但它似乎并没有真正转动数字变成他们的大写版本。

那么……如何在 UIKit 中将数字转换为大写?可以吗?

【问题讨论】:

  • 你试过- (NSString *)uppercaseStringWithLocale:(NSLocale *)locale吗?
  • 我确实尝试了使用 systemLocale、currentLocale、我自己的和 en_US 的 uppercaseStringWithLocale。两者都没有任何效果。是的,有些字体似乎有大写和小写数字。

标签: ios fonts nsstring uilabel uppercase


【解决方案1】:

This blog post 可能会有所帮助。

还请注意,虽然有 are quite a few different terms 用于这些,但在排版世界中,它们通常被称为 liningold-style 数字,而不是“大小写数字”

【讨论】:

  • 嗨 djangodude,我们正在为我们的初创公司 (en.youscribe.com) 寻找字体专家。您是否有兴趣为我们做一些工作或认识可以在这些主题上帮助我们的人(作为承包商)?如果是这样,请随时与我联系:yann.robin (at) youscribe [.com]
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-25
相关资源
最近更新 更多