【问题标题】:Display Braille characters on iPad在 iPad 上显示盲文字符
【发布时间】:2017-07-10 14:16:54
【问题描述】:

我正在为 iPad 开发一个应用程序。出于测试目的,我需要我的应用程序在 iPad 屏幕上显示盲文字符。使用objective-c,我将字体名称设置为“Apple Braille”:

outletText.font = [UIFont fontWithName:@"Apple Braille" size:fontSize];

但它不起作用。我的 iPad 上只有默认字母字符,好像“Apple Braille”字体名称无法识别。

有什么帮助吗? 谢谢。

【问题讨论】:

    标签: ios objective-c character braille


    【解决方案1】:

    Apple 盲文不是 iOS 上的内置系统字体之一。请参阅this question 了解如何在 iOS 应用中使用自定义字体。

    【讨论】:

      【解决方案2】:

      我从未使用过@"Apple Braille" 字体,我怀疑它是否已预装。 基于this article,iPhone 上可用的字体列表如下所示:

      Family name: Hiragino Kaku Gothic ProN W3
          Font name: HiraKakuProN-W3
      Family name: Courier
          Font name: Courier
          Font name: Courier-BoldOblique
          Font name: Courier-Oblique
          Font name: Courier-Bold
      Family name: Arial
          Font name: ArialMT
          Font name: Arial-BoldMT
          Font name: Arial-BoldItalicMT
          Font name: Arial-ItalicMT
      Family name: STHeiti TC
          Font name: STHeitiTC-Light
          Font name: STHeitiTC-Medium
      Family name: AppleGothic
          Font name: AppleGothic
      Family name: Courier New
          Font name: CourierNewPS-BoldMT
          Font name: CourierNewPS-ItalicMT
          Font name: CourierNewPS-BoldItalicMT
          Font name: CourierNewPSMT
      Family name: Zapfino
          Font name: Zapfino
      Family name: Hiragino Kaku Gothic ProN W6
          Font name: HiraKakuProN-W6
      Family name: Arial Unicode MS
          Font name: ArialUnicodeMS
      Family name: STHeiti SC
          Font name: STHeitiSC-Medium
          Font name: STHeitiSC-Light
      Family name: American Typewriter
          Font name: AmericanTypewriter
          Font name: AmericanTypewriter-Bold
      Family name: Helvetica
          Font name: Helvetica-Oblique
          Font name: Helvetica-BoldOblique
          Font name: Helvetica
          Font name: Helvetica-Bold
      Family name: Marker Felt
          Font name: MarkerFelt-Thin
      Family name: Helvetica Neue
          Font name: HelveticaNeue
          Font name: HelveticaNeue-Bold
      Family name: DB LCD Temp
          Font name: DBLCDTempBlack
      Family name: Verdana
          Font name: Verdana-Bold
          Font name: Verdana-BoldItalic
          Font name: Verdana
          Font name: Verdana-Italic
      Family name: Times New Roman
          Font name: TimesNewRomanPSMT
          Font name: TimesNewRomanPS-BoldMT
          Font name: TimesNewRomanPS-BoldItalicMT
          Font name: TimesNewRomanPS-ItalicMT
      Family name: Georgia
          Font name: Georgia-Bold
          Font name: Georgia
          Font name: Georgia-BoldItalic
          Font name: Georgia-Italic
      Family name: STHeiti J
          Font name: STHeitiJ-Medium
          Font name: STHeitiJ-Light
      Family name: Arial Rounded MT Bold
          Font name: ArialRoundedMTBold
      Family name: Trebuchet MS
          Font name: TrebuchetMS-Italic
          Font name: TrebuchetMS
          Font name: Trebuchet-BoldItalic
          Font name: TrebuchetMS-Bold
      Family name: STHeiti K
          Font name: STHeitiK-Medium
          Font name: STHeitiK-Light
      

      还有一个问题是你是如何提供字符的?您是否在此字体中使用了常规拉丁字符“a-z”? 也许你应该尝试使用Unicode characters specific for Braille,这应该适用于标准字体。

      【讨论】:

        【解决方案3】:

        解决方法:

            brailleSymbol = [[NSMutableString alloc] initWithBytes:&brailleUnicode length:sizeof(brailleUnicode) encoding:NSUTF32LittleEndianStringEncoding];
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-07-06
          • 2021-12-13
          相关资源
          最近更新 更多