- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
如何获取可用 NSFont 系列的列表,最好使用 fontName: 等价物。
最佳答案
NSLog(@"%@",[[[NSFontManager sharedFontManager] availableFontFamilies] description]);
给予:
"Abadi MT Condensed Extra Bold",
"Abadi MT Condensed Light",
"Academy Engraved LET",
"Al Bayan",
"American Typewriter",
"Andale Mono",
Arial,
"Arial Black",
"Arial Hebrew",
"Arial Narrow",
"Arial Rounded MT Bold",
"Arial Unicode MS",
Ayuthaya,
Baghdad,
"Bank Gothic",
Baskerville,
"Baskerville Old Face",
Batang,
"Bauhaus 93",
"Bell MT",
"Bernard MT Condensed",
BiauKai,
"Big Caslon",
"Birch Std",
"Blackmoor LET",
"Blackoak Std",
"BlairMdITC TT",
"Bodoni Ornaments ITC TT",
"Bodoni SvtyTwo ITC TT",
"Bodoni SvtyTwo OS ITC TT",
"Bodoni SvtyTwo SC ITC TT",
"Book Antiqua",
"Bookman Old Style",
"Bookshelf Symbol 7",
"Bordeaux Roman Bold LET",
"Bradley Hand ITC TT",
Braggadocio,
"Britannic Bold",
"Brush Script MT",
"Brush Script Std",
Calibri,
"Calisto MT",
Cambria,
Candara,
Capitals,
Casual,
Century,
"Century Gothic",
"Century Schoolbook",
Chalkboard,
Chalkduster,
"Chaparral Pro",
"Charcoal CY",
"Charlemagne Std",
Cochin,
"Colonna MT",
"Comic Sans MS",
Consolas,
Constantia,
"Cooper Black",
"Cooper Std",
Copperplate,
"Copperplate Gothic Bold",
"Copperplate Gothic Light",
Corbel,
"Corsiva Hebrew",
Courier,
"Courier New",
Cracked,
"Curlz MT",
"DecoType Naskh",
Desdemona,
"Devanagari MT",
Didot,
"Edwardian Script ITC",
"Engravers MT",
"Euphemia UCAS",
Eurostile,
"Footlight MT Light",
"Franklin Gothic Book",
"Franklin Gothic Medium",
Futura,
Garamond,
"GB18030 Bitmap",
"Geeza Pro",
Geneva,
"Geneva CY",
Georgia,
"Giddyup Std",
"Gill Sans",
"Gill Sans MT",
"Gill Sans Ultra Bold",
"Gloucester MT Extra Condensed",
"Goudy Old Style",
"Gujarati MT",
Gulim,
GungSeo,
"Gurmukhi MT",
Haettenschweiler,
"Handwriting - Dakota",
Harrington,
HeadLineA,
Hei,
"Heiti SC",
"Heiti TC",
Helvetica,
"Helvetica CY",
"Helvetica Neue",
Herculanum,
"Hiragino Kaku Gothic Pro",
"Hiragino Kaku Gothic ProN",
"Hiragino Kaku Gothic Std",
"Hiragino Kaku Gothic StdN",
"Hiragino Maru Gothic Pro",
"Hiragino Maru Gothic ProN",
"Hiragino Mincho Pro",
"Hiragino Mincho ProN",
"Hiragino Sans GB",
"Hobo Std",
"Hoefler Text",
Impact,
"Imprint MT Shadow",
InaiMathi,
"Jazz LET",
Kai,
Kailasa,
"Kino MT",
Kokonor,
"Kozuka Gothic Pr6N",
"Kozuka Gothic Pro",
"Kozuka Mincho Pr6N",
"Kozuka Mincho Pro",
Krungthep,
KufiStandardGK,
"Letter Gothic Std",
"LiHei Pro",
"LiSong Pro",
"Lithos Pro",
"Lucida Blackletter",
"Lucida Bright",
"Lucida Calligraphy",
"Lucida Console",
"Lucida Fax",
"Lucida Grande",
"Lucida Handwriting",
"Lucida Sans",
"Lucida Sans Typewriter",
"Lucida Sans Unicode",
"Marker Felt",
Marlett,
"Matura MT Script Capitals",
Meiryo,
Menlo,
"Mesquite Std",
"Microsoft Sans Serif",
"Minion Pro",
Mistral,
"Modern No. 20",
"Mona Lisa Solid ITC TT",
Monaco,
"MS Gothic",
"MS Mincho",
"MS PGothic",
"MS PMincho",
"MS Reference Sans Serif",
"MS Reference Specialty",
Mshtakan,
"MT Extra",
"Myriad Pro",
Nadeem,
"New Peninim MT",
"News Gothic MT",
"Nueva Std",
"OCR A Std",
Onyx,
Optima,
"Orator Std",
Osaka,
Palatino,
Papyrus,
"Party LET",
PCMyungjo,
Perpetua,
"Perpetua Titling MT",
PilGi,
"Plantagenet Cherokee",
Playbill,
PMingLiU,
"Poplar Std",
"PortagoITC TT",
"Prestige Elite Std",
"Princetown LET",
Raanana,
Rockwell,
"Rockwell Extra Bold",
"Rosewood Std",
"Santa Fe LET",
Sathu,
"Savoye LET",
"SchoolHouse Cursive B",
"SchoolHouse Printed A",
Silom,
SimSun,
Skia,
"Snell Roundhand",
Stencil,
"Stencil Std",
STFangsong,
STHeiti,
STKaiti,
"Stone Sans ITC TT",
"Stone Sans Sem ITC TT",
STSong,
Symbol,
"Synchro LET",
Tahoma,
"Tekton Pro",
Thonburi,
Times,
"Times New Roman",
"Trajan Pro",
"Trebuchet MS",
"Tw Cen MT",
"Type Embellishments One LET",
Verdana,
Webdings,
"Wide Latin",
Wingdings,
"Wingdings 2",
"Wingdings 3",
"Zapf Dingbats",
Zapfino,
"Adobe Arabic",
"Adobe Caslon Pro",
"Adobe Fan Heiti Std",
"Adobe Fangsong Std",
"Adobe Garamond Pro",
"Adobe Gothic Std",
"Adobe Hebrew",
"Adobe Heiti Std",
"Adobe Kaiti Std",
"Adobe Ming Std",
"Adobe Myungjo Std",
"Adobe Song Std",
"Apple Braille",
"Apple Chancery",
"Apple Garamond BT",
"Apple LiGothic",
"Apple LiSung",
"Apple Symbols",
AppleGothic,
AppleMyungjo,
"Monotype Corsiva",
"Monotype Sorts"
在 10.6.4 中
关于ios - 如何获得可用 NSFont 系列的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2977915/
这是一个关于 Cocoa 中字体处理的初学者问题。我有一个字体系列,例如Verdana,具有以下字体:常规、粗体、斜体和粗斜体嗯>。我知道这些字体存在,因为它们在“字体”面板中可用。 这有效: NSF
我无法找到 NSFont.TextStyleOptionKey 的有效值. 更具体地说,我想使用 NSFont.preferredFont(forTextStyle:options:)具有动态(动态点
我正在使用以下代码来查找 NSFont 大小,以使用 while 循环来适应宽度。是否有内置函数可以使计算更轻松? let ratio = image.size.width/referenceima
在 AudioUnit 插件中,我使用 NSFont。 NSFontManager* fontManager = [NSFontManager sharedFontManager]; NSFont*
我正在尝试更改 NSFont(例如 Gill Sans)中的字母间距。这是可能的还是我需要加载我自己的自定义字体? 最佳答案 虽然我认为字体可能会指定一些字距调整提示,但字距调整实际上是渲染文本的一个
我正在寻找一种更简单的方法来设置 NSFont 的权重。 现在我只能做: void SetWeight(NSFont font, int weight) { NSFontManager *man
我正在编写一个 Mac 应用程序,需要能够使用 Cocoa 在运行时创建、加载和使用自定义字体。我已经彻底研究了 NSFont 类,我所能找到的只是用于加载现有字体和更改简单参数(例如大小、粗细、间距
我试图在互联网上找到一些东西,但现在我没有答案,所以如果你能帮助我就太好了! 到目前为止,我有一个 NSFont 对象,但我想要字体的名称(如 NSString)和大小,所以我可以输出它!就像是 [N
我想制作一个 NSFont 来描述 Arial,正常,高度为 30pt。到目前为止,我有: NSNumber *weight = [NSNumber numberWithFloat:1.0];
如何获取可用 NSFont 系列的列表,最好使用 fontName: 等价物。 最佳答案 NSLog(@"%@",[[[NSFontManager sharedFontManager] availab
我们的图片编辑 cocoa 应用程序允许用户向照片添加字符串。该字符串有一个关联的 NSFont 对象。我们希望将这个 NSFont 对象存储在保存的文档中。使用 NSCoding 归档 NSFont
我有一个 NSFont,我想修改它的大小、系列和特征。 我发现我可以使用 NSFontManager 来执行此操作(例如使用 convertFont:toFamily 或 convertFont:to
我正在尝试减少应用程序在运行时使用的内存占用...... 在根据系统字体大小获取字体的标准用法中,API 用作 font = [NSFont systemFontOfSize] + (NSFont *
每当我为 NSFont 设置 pointSize 时,输出文本都不会达到点大小的精确高度,例如,当我将其设置为 20.0 时,大写 B 的输出文本高度为 17.0 像素。由于我使用它在 NSView
在搜索问题的解决方案时,我发现了 NSFont 和 UIFont, 两者之间的基本区别是什么以及我们应该在什么时候使用? 最佳答案 NSFont是 AppKit 的一部分这是 MacOS 的 UI 库
我试过 NSFont() 但它说 NSFont 是未定义的。 var fnt = NSFont(name: "Monaco", size: 12) 我试过“导入 AppKit”,但它说 AppKit
在我们的应用程序中,我们将自定义对象的字体存储为包含字体名称(从字体面板检索)的字符串,并使用实例化字体 + (NSFont *)fontWithName:(NSString *)fontName 现
我尝试将 NSFont 转换为 CGFont: var defaultFont: NSFont = NSFont.labelFont(ofSize: CGFloat(currentSize)) 像这
我正在编写单元测试来检查生成的 NSAttributedString 的格式。 我可以这样提取字体: if let font = attributedString.attributesAtIndex(
我有一个小型 MacRuby 应用程序,它在 NSTextView 中显示一些文本。我有一个名为 make_label() 的方法,它使用一些文本构建 NSTextView 并返回它,我用它通过 ad
我是一名优秀的程序员,十分优秀!