我正在为iPad开发一款应用。出于测试目的,我需要我的应用程序在iPad屏幕上显示盲文字符。使用objective-c我将字体名称设置为“Apple Braille”:
outletText.font = [UIFont fontWithName:@"Apple Braille" size:fontSize];
但它不起作用。我的iPad上只有默认的字母字符,就像“Apple Braille”字体名称一样,无法识别。
有任何帮助吗? 谢谢。
答案 0 :(得分:0)
Apple Braille不是iOS上的内置系统字体之一。有关如何在iOS应用中使用自定义字体,请参阅this question。
答案 1 :(得分:0)
我从未使用过@" 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,这应该使用标准字体。
答案 2 :(得分:0)
解决使用:
brailleSymbol = [[NSMutableString alloc] initWithBytes:&brailleUnicode length:sizeof(brailleUnicode) encoding:NSUTF32LittleEndianStringEncoding];