NSFont

[Font]フォントリスト(サンプル文字入り)でRTFリッチテキストを生成する


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#com.cocolog-nifty.quicktimer.icefloe
004# 日本語判定方法がわからないので現状はここまで
005----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
006use AppleScript version "2.8"
007use framework "Foundation"
008use framework "AppKit"
009use scripting additions
010
011property refMe : a reference to current application
012
013
014##########################################
015# 【1】出力先確保
016set appFileManager to refMe's NSFileManager's defaultManager()
017set ocidURLsArray to (appFileManager's URLsForDirectory:(refMe's NSDocumentDirectory) inDomains:(refMe's NSUserDomainMask))
018set ocidDocumentDirPathURL to ocidURLsArray's firstObject()
019set ocidSaveDirPathURL to ocidDocumentDirPathURL's URLByAppendingPathComponent:("Library/Fonts") isDirectory:(true)
020#フォルダ作って
021set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
022ocidAttrDict's setValue:(448) forKey:(refMe's NSFilePosixPermissions)
023set listDone to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error| :(reference)
024#保存ファイル
025set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("FontNameList.rtf") isDirectory:(false)
026
027##########################################
028# 【2】出力するテキスト
029set strSampleText to ("美しい日本語")
030
031set strSampleText1 to ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
032set strSampleText2 to ("abcdefghijklmnopqrstuvwxyz")
033set strSampleText3 to ("0123456789!#$%&=@*<>?¥^")
034
035
036
037##########################################
038# 【3】 フォントの一覧
039set appFontManager to (refMe's NSFontManager's sharedFontManager())
040#
041set ocidFontArray to appFontManager's availableFonts()
042set numCntFont to ocidFontArray's |count|()
043#フォントファミリー
044set ocidFontFamiliesArray to appFontManager's availableFontFamilies()
045set numCntFontFamily to ocidFontFamiliesArray's |count|()
046
047set strSetInfoText to ("文字が無い場合は日本語はヒラギノ、欧文はヘルベチカで表示されます\n\n") as text
048set strSetInfoText to (strSetInfoText & "フォントファミリー: " & numCntFontFamily & " \n") as text
049set strSetInfoText to (strSetInfoText & "フォント: " & numCntFont & "書体ありました\n\n") as text
050#各種初期化
051set ocidSaveString to refMe's NSMutableAttributedString's alloc()'s initWithString:(strSetInfoText)
052set ocidAttributeDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
053set ocidLFString to refMe's NSMutableAttributedString's alloc()'s initWithString:("\n")
054
055#ファミリー順に繰り返し
056repeat with itemFontFamilie in ocidFontFamiliesArray
057  set ocidFontArray to (appFontManager's availableMembersOfFontFamily:(itemFontFamilie))
058  repeat with itemFont in ocidFontArray
059    #
060    set ocidItemFontName to itemFont's firstObject()
061    ##    
062    set strFontName to ocidItemFontName as text
063    set ocidSetFont to (refMe's NSFont's fontWithName:(ocidItemFontName) |size|:(12))
064    (ocidAttributeDict's setObject:(ocidSetFont) forKey:(refMe's NSFontAttributeName))
065    set ocidAppendString to (refMe's NSMutableAttributedString's alloc()'s initWithString:(ocidItemFontName) attributes:(ocidAttributeDict))
066    (ocidSaveString's appendAttributedString:(ocidAppendString))
067    set ocidLFString to (refMe's NSMutableAttributedString's alloc()'s initWithString:("\n") attributes:(ocidAttributeDict))
068    (ocidSaveString's appendAttributedString:(ocidLFString))
069    set ocidSetFont to (refMe's NSFont's fontWithName:(ocidItemFontName) |size|:(24))
070    (ocidAttributeDict's setObject:(ocidSetFont) forKey:(refMe's NSFontAttributeName))
071    set ocidAppendString to (refMe's NSMutableAttributedString's alloc()'s initWithString:(strSampleText1) attributes:(ocidAttributeDict))
072    set ocidLFString to (refMe's NSMutableAttributedString's alloc()'s initWithString:("\n") attributes:(ocidAttributeDict))
073    (ocidSaveString's appendAttributedString:(ocidAppendString))
074    (ocidSaveString's appendAttributedString:(ocidLFString))
075    set ocidAppendString to (refMe's NSMutableAttributedString's alloc()'s initWithString:(strSampleText2) attributes:(ocidAttributeDict))
076    (ocidSaveString's appendAttributedString:(ocidAppendString))
077    (ocidSaveString's appendAttributedString:(ocidLFString))
078    set ocidAppendString to (refMe's NSMutableAttributedString's alloc()'s initWithString:(strSampleText3) attributes:(ocidAttributeDict))
079    (ocidSaveString's appendAttributedString:(ocidAppendString))
080    (ocidSaveString's appendAttributedString:(ocidLFString))
081    ##日本語部分
082    #set ocidAppendString to (refMe's NSMutableAttributedString's alloc()'s initWithString:(strSampleText) attributes:(ocidAttributeDict))
083    #(ocidSaveString's appendAttributedString:(ocidAppendString))
084    #(ocidSaveString's appendAttributedString:(ocidLFString))
085    
086    (ocidSaveString's appendAttributedString:(ocidLFString))
087  end repeat
088end repeat
089
090##########################################
091# NSDATAに変換して
092set ocidLengeth to (ocidSaveString's |length|())
093set ocidRange to refMe's NSMakeRange(0, ocidLengeth)
094set ocidSaveAttarDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
095ocidSaveAttarDict's setObject:(refMe's NSRTFTextDocumentType) forKey:(refMe's NSDocumentTypeDocumentAttribute)
096set ocidSaveData to ocidSaveString's RTFFromRange:(ocidRange) documentAttributes:(ocidSaveAttarDict)
097
098
099##########################################
100# 保存
101set listDone to ocidSaveData's writeToURL:(ocidSaveFilePathURL) options:(refMe's NSDataWritingAtomic) |error| :(reference)
102
103if (item 1 of listDone) is true then
104  log "正常処理"
105else if (item 2 of listDone) ≠ (missing value) then
106  log (item 2 of listDone)'s code() as text
107  log (item 2 of listDone)'s localizedDescription() as text
108  return "エラーしました"
109end if
110
111
112##########################################
113#開く
114set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
115set boolDone to appSharedWorkspace's openURL:(ocidSaveFilePathURL)
116
AppleScriptで生成しました

|

[font book]フォントライブラリを作成する

ローカルドメイン(system liblary application)はURL形式のパス
ユーザードメイン(ホームディレクトリ)はエイリアスデータbookmarkのNSdataの登録となり
処理が異なる。

【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

property refMe : a reference to current application

###フォントブックを終了
tell application id "com.apple.FontBook"
  quit
end tell

##############################
###ライブラリ名を指定 ダイアログ
set appFileManager to refMe's NSFileManager's defaultManager()
###FontCollectionsのフォルダパス
set ocidUserLibraryPathArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidUserLibraryPath to ocidUserLibraryPathArray's firstObject()
set ocidFontCollectionsURL to ocidUserLibraryPath's URLByAppendingPathComponent:("FontCollections") isDirectory:(true)
set aliasFontCollectionsURL to ocidFontCollectionsURL's absoluteURL() as alias
##############################
#####ダイアログを前面に
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder" to activate
else
  tell current application to activate
end if
##############################
###ダイアログ
set strDefaultName to "名称未設定.library" as text
set strExtension to "library"
set strPromptText to "フォントライブラリの名前を決めてください" as text
set strMesText to "フォントライブラリの名前を決めてください" as text
set aliasFilePath to (choose file name strMesText default location aliasFontCollectionsURL default name strDefaultName with prompt strPromptText) as «class furl»
##############################
###ライブラリファイルのパス
set strFilePath to (POSIX path of aliasFilePath) as text
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePath)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFilePath) isDirectory:false)
set ocidFileName to ocidFilePathURL's lastPathComponent()
set ocidBaseFileName to ocidFileName's stringByDeletingPathExtension()
set ocidExtensionName to ocidFilePathURL's pathExtension()
###空の文字列 if文用
set ocidEmptyString to refMe's NSString's alloc()'s init()
if ocidExtensionName = ocidEmptyString then
  ###ダイアログで拡張子取っちゃった場合対策
  set ocidFilePathURL to ocidFilePathURL's URLByAppendingPathExtension:(strExtension)
end if

##############################
### フォルダ選択 
###(選択したフォルダの最下層までフォントを取得する)
set ocidUserDesktopPathArray to (appFileManager's URLsForDirectory:(refMe's NSDesktopDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidUserDesktopPath to ocidUserDesktopPathArray's firstObject()
###ダイアログ
set aliasFontCollectionsURL to ocidUserDesktopPath's absoluteURL() as alias
set strMes to "フォルダを選んでください"
set strPrompt to "フォントをライブラリに登録するフォルダ(フォントが入っているフォルダ)を選んでください"
set aliasFolderPath to (choose folder strMes with prompt strPrompt default location aliasFontCollectionsURL with invisibles and showing package contents without multiple selections allowed)
##############################
###読み込むフォントのパス
set strFontsDirPath to POSIX path of aliasFolderPath as text
set ocidFontsDirPathStr to refMe's NSString's stringWithString:(strFontsDirPath)
set ocidFontsDirPath to ocidFontsDirPathStr's stringByStandardizingPath()
set ocidFontsDirPathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFontsDirPath) isDirectory:true)
##############################
##### ユーザー ドメイン専用
if strFontsDirPath starts with "/Users" then
  log "処理開始"
  ###########################################
  ###ユーザーフォント用
  ###########################################
  ##############################
  ###enumeratorAtURLL格納するリスト
  set ocidEmuFileURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  ###フォントファイルのURLのみを格納するリスト
  set ocidFontFilePathURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  
  ##############################
  ###ディレクトリのコンテツを収集
  ###収集する付随プロパティ
  set ocidPropertiesForKeys to {(refMe's NSURLContentTypeKey), (refMe's NSURLIsRegularFileKey)}
  ####ディレクトリのコンテツを収集
  set ocidEmuDict to (appFileManager's enumeratorAtURL:(ocidFontsDirPathURL) includingPropertiesForKeys:ocidPropertiesForKeys options:(refMe's NSDirectoryEnumerationSkipsHiddenFiles) errorHandler:(reference))
  ###戻り値用のリストに格納
ocidEmuFileURLArray's addObjectsFromArray:(ocidEmuDict's allObjects)
  
  ##############################
  ###『ファイル』だけ取り出したリストにする
  ####enumeratorAtURLのかずだけ繰り返し
  repeat with itemEmuFileURL in ocidEmuFileURLArray
    ####URLをforKeyで取り出し
    set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLIsRegularFileKey) |error|:(reference))
    ###リストからNSURLIsRegularFileKeyのBOOLを取り出し
    set boolIsRegularFileKey to item 2 of listResult
    log boolIsRegularFileKey as text
    ####ファイルのみを(ディレクトリやリンボリックリンクは含まない)
    if boolIsRegularFileKey is (refMe's NSNumber's numberWithBool:true) then
      set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLContentTypeKey) |error|:(reference))
      set ocidContentType to item 2 of listResult
      set strUTI to (ocidContentType's identifier) as text
      if strUTI contains "font" then
####リストにする
(ocidFontFilePathURLArray's addObject:(itemEmuFileURL))
      end if
    end if
  end repeat
  
  ##############################
  ###URL格納用(absoluteString)
  set ocidFontPathArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  repeat with itemAliasFontPath in ocidFontFilePathURLArray
(ocidFontPathArray's addObject:(itemAliasFontPath))
  end repeat
  
  ##############################
  ###PLISTのデータになるDict
  set ocidPlistDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
  ###bookmarks
  set ocidBookmarks to refMe's NSMutableDictionary's alloc()'s init()
  ##############################
  ###containerURLs
  set ocidContainerURLs to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  repeat with itemFontPathArray in ocidFontPathArray
    ###このifは不要かな?
    set ocidFontStrigsPath to (itemFontPathArray's |path|())
    if (ocidFontStrigsPath as text) starts with "/Users/" then
      ###containerURLsはパスとエイリアスデータ
      set strRelativePath to "/" as text
      set ocidRelativePathStr to (refMe's NSString's stringWithString:(strRelativePath))
      set ocidRelativePath to ocidRelativePathStr's stringByStandardizingPath()
      set ocidRelativeToURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidRelativePath) isDirectory:true)
      set ocidBookMarkPathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFontStrigsPath) isDirectory:false)
      ##############################
      ###bookmark エイリアスデータ生成
      set ocidBookMarkDataArray to (ocidBookMarkPathURL's bookmarkDataWithOptions:(11) includingResourceValuesForKeys:({missing value}) relativeToURL:(missing value) |error|:(reference))
      set ocidBookMarkData to item 1 of ocidBookMarkDataArray
      ###bookmarkデータを追加
(ocidBookmarks's setObject:(ocidBookMarkData) forKey:(ocidFontStrigsPath))
    else
      set strAbsoluteStringPath to (itemFontPathArray's absoluteString())
(ocidContainerURLs's addObject:(strAbsoluteStringPath))
    end if
  end repeat
ocidPlistDict's setObject:(ocidBookmarks) forKey:("bookmarks")
ocidPlistDict's setObject:(ocidContainerURLs) forKey:("containerURLs")
  ###disabled
  set ocidFalse to (refMe's NSNumber's numberWithBool:false)
ocidPlistDict's setValue:(ocidFalse) forKey:("disabled")
  ###name
ocidPlistDict's setValue:(ocidBaseFileName) forKey:("name")
  ###reference
  set ocidReference to refMe's NSNumber's numberWithInteger:(1)
ocidPlistDict's setValue:(ocidReference) forKey:("reference")
  ###date
  set ocidDate to (refMe's NSDate's |date|())
  set ocidFormatter to refMe's NSDateFormatter's alloc()'s init()
ocidFormatter's setDateFormat:("yyyy-MM-dd'T'HH:mm:ss'Z'")
ocidFormatter's setTimeZone:(refMe's NSTimeZone's timeZoneWithAbbreviation:("UTC"))
  set ocidSetDate to ocidFormatter's stringFromDate:(ocidDate)
  -->string形式でセットするのでsetValueで
ocidPlistDict's setValue:(ocidSetDate) forKey:("date")
  ##############################
  ###urlAddedDates
  set ocidUrlAddedDates to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
  ###フォントのURLを追加(absoluteString形式)
  repeat with itemFontPathArray in ocidFontPathArray
    set strPath to (itemFontPathArray's |path|())
(ocidUrlAddedDates's setValue:(ocidSetDate) forKey:(strPath))
  end repeat
ocidPlistDict's setObject:(ocidUrlAddedDates) forKey:("urlAddedDates")
  ###version
ocidFormatter's setDateFormat:("yyyyMMdd")
  set ocidversion to ocidFormatter's stringFromDate:(ocidDate)
ocidPlistDict's setValue:(ocidversion) forKey:("version")
  ######################
  ###XML形式
  set ocidXmlplist to refMe's NSPropertyListXMLFormat_v1_0
  ####書き込み用にXMLに変換
  set ocidPlistEditData to refMe's NSPropertyListSerialization's dataWithPropertyList:(ocidPlistDict) format:(ocidXmlplist) options:0 |error|:(missing value)
  ####書き込み
ocidPlistEditData's writeToURL:(ocidFilePathURL) atomically:true
else
  ###########################################
  ###ローカルフォント用
  ###########################################
  ###enumeratorAtURLL格納するリスト
  set ocidEmuFileURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  ###フォントファイルのURLのみを格納するリスト
  set ocidFontFilePathURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  
  ##############################
  #####ディレクトリのコンテツを収集
  ###収集する付随プロパティ
  set ocidPropertiesForKeys to {(refMe's NSURLContentTypeKey), (refMe's NSURLIsRegularFileKey)}
  ####ディレクトリのコンテツを収集
  set ocidEmuDict to (appFileManager's enumeratorAtURL:(ocidFontsDirPathURL) includingPropertiesForKeys:ocidPropertiesForKeys options:(refMe's NSDirectoryEnumerationSkipsHiddenFiles) errorHandler:(reference))
  ###戻り値用のリストに格納
ocidEmuFileURLArray's addObjectsFromArray:(ocidEmuDict's allObjects)
  
  ##############################
  #####『ファイル』だけ取り出したリストにする
  ####enumeratorAtURLのかずだけ繰り返し
  repeat with itemEmuFileURL in ocidEmuFileURLArray
    
    ####URLをforKeyで取り出し
    set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLIsRegularFileKey) |error|:(reference))
    ###リストからNSURLIsRegularFileKeyのBOOLを取り出し
    set boolIsRegularFileKey to item 2 of listResult
    log boolIsRegularFileKey as text
    ####ファイルのみを(ディレクトリやリンボリックリンクは含まない)
    if boolIsRegularFileKey is (refMe's NSNumber's numberWithBool:true) then
      set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLContentTypeKey) |error|:(reference))
      set ocidContentType to item 2 of listResult
      set strUTI to (ocidContentType's identifier) as text
      if strUTI contains "font" then
####リストにする
(ocidFontFilePathURLArray's addObject:(itemEmuFileURL))
      end if
    end if
  end repeat
  
  ##############################
  #####URL格納用(absoluteString)
  set ocidFontPathArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  repeat with itemAliasFontPath in ocidFontFilePathURLArray
(ocidFontPathArray's addObject:(itemAliasFontPath))
  end repeat
  
  ##############################
  ##### PLIST処理
  ###PLISTのデータになるDict
  set ocidPlistDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
  ###bookmarks
  set ocidBookmarks to refMe's NSMutableDictionary's alloc()'s init()
ocidPlistDict's setObject:(ocidBookmarks) forKey:("bookmarks")
  #####################
  ###containerURLs
  set ocidContainerURLs to refMe's NSMutableArray's alloc()'s initWithCapacity:0
  ###フォントのURLを追加(absoluteString形式)
  repeat with itemFontPathArray in ocidFontPathArray
    set strAbsoluteStringPath to (itemFontPathArray's absoluteString())
(ocidContainerURLs's addObject:(strAbsoluteStringPath))
  end repeat
ocidPlistDict's setObject:(ocidContainerURLs) forKey:("containerURLs")
  ###disabled
  set ocidFalse to (refMe's NSNumber's numberWithBool:false)
ocidPlistDict's setValue:(ocidFalse) forKey:("disabled")
  ###name
ocidPlistDict's setValue:(ocidBaseFileName) forKey:("name")
  ###reference
  set ocidReference to refMe's NSNumber's numberWithInteger:(1)
ocidPlistDict's setValue:(ocidReference) forKey:("reference")
  ###date
  set ocidDate to (refMe's NSDate's |date|())
  set ocidFormatter to refMe's NSDateFormatter's alloc()'s init()
ocidFormatter's setDateFormat:("yyyy-MM-dd'T'HH:mm:ss'Z'")
ocidFormatter's setTimeZone:(refMe's NSTimeZone's timeZoneWithAbbreviation:("UTC"))
  set ocidSetDate to ocidFormatter's stringFromDate:(ocidDate)
  -->string形式でセットするのでsetValueで
ocidPlistDict's setValue:(ocidSetDate) forKey:("date")
  #####################
  ###urlAddedDates
  set ocidUrlAddedDates to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
  ###フォントのURLを追加(absoluteString形式)
  repeat with itemFontPathArray in ocidFontPathArray
    set strPath to (itemFontPathArray's |path|())
(ocidUrlAddedDates's setValue:(ocidSetDate) forKey:(strPath))
  end repeat
ocidPlistDict's setObject:(ocidUrlAddedDates) forKey:("urlAddedDates")
  ###version
ocidFormatter's setDateFormat:("yyyyMMdd")
  set ocidversion to ocidFormatter's stringFromDate:(ocidDate)
ocidPlistDict's setValue:(ocidversion) forKey:("version")
  
  ######################
  ###XML形式
  set ocidXmlplist to refMe's NSPropertyListXMLFormat_v1_0
  ####書き込み用にXMLに変換
  set ocidPlistEditData to refMe's NSPropertyListSerialization's dataWithPropertyList:(ocidPlistDict) format:(ocidXmlplist) options:0 |error|:(missing value)
  ####書き込み
ocidPlistEditData's writeToURL:(ocidFilePathURL) atomically:true
  
end if


###フォントブックを起動
tell application id "com.apple.FontBook"
  launch
end tell



|

[FontBook]ライブラリにフォントを登録する(途中 現在不具合あり)

bookmark(ファイルエイリアス)の内容NSDATAに相違があり
どうしてもうまくいかない

【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions

property refMe : a reference to current application


###フォントブックを終了
tell application id "com.apple.FontBook"
  quit
end tell

##############################
###ライブラリ名を指定 ダイアログ
set appFileManager to refMe's NSFileManager's defaultManager()
###FontCollectionsのフォルダパス
set ocidUserLibraryPathArray to (appFileManager's URLsForDirectory:(refMe's NSLibraryDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidUserLibraryPath to ocidUserLibraryPathArray's firstObject()
set ocidFontCollectionsURL to ocidUserLibraryPath's URLByAppendingPathComponent:("FontCollections") isDirectory:(true)
set aliasFontCollectionsURL to ocidFontCollectionsURL's absoluteURL() as alias
##############################
#####ダイアログを前面に
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder" to activate
else
  tell current application to activate
end if
set strDefaultName to "名称未設定.library" as text
set strExtension to "library"
set strPromptText to "フォントライブラリの名前を決めてください" as text
set strMesText to "フォントライブラリの名前を決めてください" as text
set aliasFilePath to (choose file name strMesText default location aliasFontCollectionsURL default name strDefaultName with prompt strPromptText) as «class furl»
######
set strFilePath to (POSIX path of aliasFilePath) as text
set ocidFilePathStr to refMe's NSString's stringWithString:(strFilePath)
set ocidFilePath to ocidFilePathStr's stringByStandardizingPath()
set ocidFilePathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFilePath) isDirectory:false)
set ocidFileName to ocidFilePathURL's lastPathComponent()
set ocidBaseFileName to ocidFileName's stringByDeletingPathExtension()
set ocidExtensionName to ocidFilePathURL's pathExtension()
###空の文字列 if文用
set ocidEmptyString to refMe's NSString's alloc()'s init()
if ocidExtensionName = ocidEmptyString then
  ###ダイアログで拡張子取っちゃった場合対策
  set ocidFilePathURL to ocidFilePathURL's URLByAppendingPathExtension:(strExtension)
end if
##############################
### フォルダ選択 
###(選択したフォルダの最下層までフォントを取得する)
set ocidUserDesktopPathArray to (appFileManager's URLsForDirectory:(refMe's NSDesktopDirectory) inDomains:(refMe's NSUserDomainMask))
set ocidUserDesktopPath to ocidUserDesktopPathArray's firstObject()
###ダイアログ
set aliasFontCollectionsURL to ocidUserDesktopPath's absoluteURL() as alias
set aliasFolderPath to (choose folder "フォントをライブラリに登録するフォルだ(フォントが入っているフォルダ)を選んでください" with prompt "フォントファイルを選んでください" default location aliasFontCollectionsURL with invisibles and showing package contents without multiple selections allowed)

set strFontsDirPath to POSIX path of aliasFolderPath as text
set ocidFontsDirPathStr to refMe's NSString's stringWithString:(strFontsDirPath)
set ocidFontsDirPath to ocidFontsDirPathStr's stringByStandardizingPath()
set ocidFontsDirPathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFontsDirPath) isDirectory:true)

###enumeratorAtURLL格納するリスト
set ocidEmuFileURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
###フォントファイルのURLのみを格納するリスト
set ocidFontFilePathURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0

##############################################
##ディレクトリのコンテツを収集
##############################################
###収集する付随プロパティ
set ocidPropertiesForKeys to {(refMe's NSURLContentTypeKey), (refMe's NSURLIsRegularFileKey)}
####ディレクトリのコンテツを収集
set ocidEmuDict to (appFileManager's enumeratorAtURL:(ocidFontsDirPathURL) includingPropertiesForKeys:ocidPropertiesForKeys options:(refMe's NSDirectoryEnumerationSkipsHiddenFiles) errorHandler:(reference))
###戻り値用のリストに格納
ocidEmuFileURLArray's addObjectsFromArray:(ocidEmuDict's allObjects)

##############################################
##『ファイル』だけ取り出したリストにする
##############################################

####enumeratorAtURLのかずだけ繰り返し
repeat with itemEmuFileURL in ocidEmuFileURLArray
  
  ####URLをforKeyで取り出し
  set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLIsRegularFileKey) |error|:(reference))
  ###リストからNSURLIsRegularFileKeyのBOOLを取り出し
  set boolIsRegularFileKey to item 2 of listResult
  log boolIsRegularFileKey as text
  ####ファイルのみを(ディレクトリやリンボリックリンクは含まない)
  if boolIsRegularFileKey is (refMe's NSNumber's numberWithBool:true) then
    set listResult to (itemEmuFileURL's getResourceValue:(reference) forKey:(refMe's NSURLContentTypeKey) |error|:(reference))
    set ocidContentType to item 2 of listResult
    set strUTI to (ocidContentType's identifier) as text
    if strUTI contains "font" then
      ####リストにする
(ocidFontFilePathURLArray's addObject:(itemEmuFileURL))
    end if
  end if
end repeat

###URL格納用(absoluteString)
set ocidFontPathArray to refMe's NSMutableArray's alloc()'s initWithCapacity:0
repeat with itemAliasFontPath in ocidFontFilePathURLArray
(ocidFontPathArray's addObject:(itemAliasFontPath))
end repeat


######################
###PLISTのデータになるDict
set ocidPlistDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0



###bookmarks
set ocidBookmarks to refMe's NSMutableDictionary's alloc()'s init()
###containerURLs
set ocidContainerURLs to refMe's NSMutableArray's alloc()'s initWithCapacity:0


repeat with itemFontPathArray in ocidFontPathArray
  set ocidFontStrigsPath to (itemFontPathArray's |path|())
  if (ocidFontStrigsPath as text) starts with "/Users/" then
    
    
    set strRelativePath to "/" as text
    set ocidRelativePathStr to (refMe's NSString's stringWithString:(strRelativePath))
    set ocidRelativePath to ocidRelativePathStr's stringByStandardizingPath()
    set ocidRelativeToURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidRelativePath) isDirectory:true)
    
    
    set ocidBookMarkPathURL to (refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFontStrigsPath) isDirectory:false)
    
    set ocidOption to (refMe's NSURLBookmarkCreationWithSecurityScope)
    
    set ocidBookMarkDataArray to (ocidBookMarkPathURL's bookmarkDataWithOptions:(ocidOption) includingResourceValuesForKeys:({missing value}) relativeToURL:(missing value) |error|:(reference))
    
    set ocidBookMarkData to item 1 of ocidBookMarkDataArray
(ocidBookmarks's setObject:(ocidBookMarkData) forKey:(ocidFontStrigsPath))
  else
    set strAbsoluteStringPath to (itemFontPathArray's absoluteString())
(ocidContainerURLs's addObject:(strAbsoluteStringPath))
  end if
end repeat


ocidPlistDict's setObject:(ocidBookmarks) forKey:("bookmarks")
ocidPlistDict's setObject:(ocidContainerURLs) forKey:("containerURLs")


###disabled
set ocidFalse to (refMe's NSNumber's numberWithBool:false)
ocidPlistDict's setValue:(ocidFalse) forKey:("disabled")
###name
ocidPlistDict's setValue:(ocidBaseFileName) forKey:("name")
###reference
set ocidReference to refMe's NSNumber's numberWithInteger:(1)
ocidPlistDict's setValue:(ocidReference) forKey:("reference")
###date
set ocidDate to (refMe's NSDate's |date|())
set ocidFormatter to refMe's NSDateFormatter's alloc()'s init()
ocidFormatter's setDateFormat:("yyyy-MM-dd'T'HH:mm:ss'Z'")
ocidFormatter's setTimeZone:(refMe's NSTimeZone's timeZoneWithAbbreviation:("UTC"))
set ocidSetDate to ocidFormatter's stringFromDate:(ocidDate)
-->string形式でセットするのでsetValueで
ocidPlistDict's setValue:(ocidSetDate) forKey:("date")
###urlAddedDates
set ocidUrlAddedDates to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
###フォントのURLを追加(absoluteString形式)
repeat with itemFontPathArray in ocidFontPathArray
  set strPath to (itemFontPathArray's |path|())
(ocidUrlAddedDates's setValue:(ocidSetDate) forKey:(strPath))
end repeat

ocidPlistDict's setObject:(ocidUrlAddedDates) forKey:("urlAddedDates")
###version
ocidFormatter's setDateFormat:("yyyyMMdd")
set ocidversion to ocidFormatter's stringFromDate:(ocidDate)
ocidPlistDict's setValue:(ocidversion) forKey:("version")

######################
###XML形式
set ocidXmlplist to refMe's NSPropertyListXMLFormat_v1_0
####書き込み用にXMLに変換
set ocidPlistEditData to refMe's NSPropertyListSerialization's dataWithPropertyList:(ocidPlistDict) format:(ocidXmlplist) options:0 |error|:(missing value)
####書き込み
ocidPlistEditData's writeToURL:(ocidFilePathURL) atomically:true


###フォントブックを起動
tell application id "com.apple.FontBook"
  launch
end tell





|

フォント名収集とフォント選択(たぶん日本語可なフォントのリスト)


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "Appkit"
use scripting additions

property refMe : a reference to current application

set appFileManager to refMe's NSFileManager's defaultManager()


###################################
##### フォント収集
###################################
###フォント初期化
set appFontManager to refMe's NSFontManager
set appSharedMaanager to appFontManager's sharedFontManager()
###利用可能なフォントリスト
set ocidFontList to appSharedMaanager's availableFonts()
###格納用のレコード
set ocidFontNameeDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0

###フォントの数だけ繰り返し
repeat with itemFontList in ocidFontList
  ###PS名でフォントオブジェクトにして
  set ocidTempFont to (refMe's NSFont's fontWithName:(itemFontList) matrix:(missing value))
  ###収録文字数を調べ
  set intCharCnt to ocidTempFont's numberOfGlyphs as integer
  ###5000文字以上なら日本語もあるだろって事で
  if intCharCnt > 5000 then
    set strDisplayName to ocidTempFont's displayName as text
    ###レコードに追加
(ocidFontNameeDict's setObject:(itemFontList) forKey:(strDisplayName))
  end if
end repeat


###################################
##### ダイアログ
###################################
###ダイアログを前面に
tell current application
  set strName to name as text
end tell
####スクリプトメニューから実行したら
if strName is "osascript" then
  tell application "Finder"
    activate
  end tell
else
  tell current application
    activate
  end tell
end if

###格納用の可変リスト
set ocidFontNameeArray to (refMe's NSMutableArray's alloc()'s initWithCapacity:0)
###ディレクトリのallValuesで値のみのリスト
ocidFontNameeArray's addObjectsFromArray:(ocidFontNameeDict's allKeys())
###並び替え
set ocidSortDescriptor to (refMe's NSSortDescriptor's sortDescriptorWithKey:"self" ascending:(true) selector:"localizedStandardCompare:")
(ocidFontNameeArray's sortUsingDescriptors:{ocidSortDescriptor})
####デフォルト選択値
set strDefailtsFont to "Osaka−等幅" as text
set intDefaultsFont to (ocidFontNameeArray's indexOfObject:(strDefailtsFont)) + 1 as integer
set listFontList to ocidFontNameeArray as list
###ダイアログ
try
  set listResponse to (choose from list listFontList with title "選んでください" with prompt "フォントを選んでください\r複数可" default items (item intDefaultsFont of listFontList) OK button name "OK" cancel button name "キャンセル" with multiple selections allowed without empty selection allowed) as list
on error
  log "エラーしました"
return "エラーしました"
end try
if (item 1 of listResponse) is false then
return "キャンセルしました"
end if
###################################
##### 選択した数だけ繰り返し
###################################
repeat with itemFontDisplayName in listResponse
  ###PS名
  log (ocidFontNameeDict's valueForKey:itemFontDisplayName) as text
  
end repeat



|

画像にテキストを描画する


【スクリプトエディタで開く】|

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "Appkit"
use scripting additions

property refMe : a reference to current application

set appFileManager to refMe's NSFileManager's defaultManager()

###################################
#####パス処理
###################################
set strFilePath to "~/Desktop/image.png" as text
set ocidFilePathstr to refMe's NSString's stringWithString:(strFilePath)
set ocidFilePath to ocidFilePathstr's stringByStandardizingPath()
set ocidFilePathURL to refMe's NSURL's alloc()'s initFileURLWithPath:(ocidFilePath) isDirectory:false

###################################
#####画像生成
###################################
###サイズ ピクセル 横縦
set numPixelsWide to 720 as integer
set numPixelsHigh to 360 as integer
###背景色指定
set ocidSetColor to refMe's NSColor's colorWithDeviceRed:1 green:1 blue:1 alpha:1
##透過指定
set ocidSetColor to refMe's NSColor's clearColor
##フォーマット
set ocidFormat to refMe's NSBitmapFormatAlphaFirst
###カラースペース
set ocidColorSpace to refMe's NSCalibratedRGBColorSpace

####生成本処理
set ocidBitmapImageRep to (refMe's NSBitmapImageRep's alloc()'s initWithBitmapDataPlanes:(missing value) pixelsWide:(numPixelsWide) pixelsHigh:(numPixelsHigh) bitsPerSample:8 samplesPerPixel:4 hasAlpha:true isPlanar:false colorSpaceName:(ocidColorSpace) bitmapFormat:(ocidFormat) bytesPerRow:0 bitsPerPixel:32)

###################################
#####テキスト生成
###################################
###設定用のレコード
set ocidTextAttr to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0

#################################
##描画する文字列
set ocidText to refMe's NSString's stringWithString:("美しい日本語")

#################################
###色指定
set ocidTextColor to refMe's NSColor's blackColor
###RGBA 透過指定
set ocidTextColor to refMe's NSColor's colorWithSRGBRed:0 green:0 blue:0 alpha:0.8
ocidTextAttr's setObject:(ocidTextColor) forKey:(refMe's NSForegroundColorAttributeName)

#################################
##システムフォント
set ocidFont to refMe's NSFont's systemFontOfSize:36
###PS名指定でもいける?
set ocidFont to refMe's NSFont's fontWithName:"Osaka-Mono" |size|:36
ocidTextAttr's setObject:(ocidFont) forKey:(refMe's NSFontAttributeName)

#################################
##行間
set ocidStyle to refMe's NSParagraphStyle's defaultParagraphStyle
ocidTextAttr's setObject:(ocidStyle) forKey:(refMe's NSParagraphStyleAttributeName)

#################################
##カーニング
set ocidKern to refMe's NSTextScalingStandard
set ocidKern to refMe's NSTextScalingiOS
set ocidKern to -1.8 as number
ocidTextAttr's setObject:(ocidKern) forKey:(refMe's NSKernAttributeName)

#################################
##ドロップシャドウ
set ocidShadow to refMe's NSShadow's alloc()'s init()
###テキスト色と同色にする場合
set ocidShadowColor to ocidTextColor's colorWithAlphaComponent:0.8
###色指定する場合
set ocidShadowColor to refMe's NSColor's colorWithDeviceRed:0 green:0 blue:0 alpha:0.5
ocidShadow's setShadowColor:(ocidShadowColor)
ocidShadow's setShadowOffset:(refMe's NSMakeSize(1, -1))
ocidShadow's setShadowBlurRadius:4
ocidTextAttr's setObject:(ocidShadow) forKey:(refMe's NSShadowAttributeName)


####描画されるテキストボックスのサイズ
set ocidTextSize to ocidText's sizeWithAttributes:(ocidTextAttr)
set ocidTextWide to ocidTextSize's width as integer
set ocidTextHigh to ocidTextSize's height as integer

###################################
#####描画位置
###################################
###余白
set numPadding to 10 as integer
(*
###真ん中
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide) / 2, (numPixelsHigh - ocidTextHigh) / 2)
###下中央
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide) / 2, numPadding)
###左下
set ocidTextOrigin to refMe's NSMakePoint(numPadding, numPadding)
###右下
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide - numPadding), numPadding)
###上中央
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide) / 2, (numPixelsHigh - ocidTextHigh))
###上右
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide - numPadding), (numPixelsHigh - ocidTextHigh))
###上左
set ocidTextOrigin to refMe's NSMakePoint(numPadding, (numPixelsHigh - ocidTextHigh))
*)
###右下
set ocidTextOrigin to refMe's NSMakePoint((numPixelsWide - ocidTextWide - numPadding), numPadding)

###################################
##### テキスト描画
###################################
###初期化
refMe's NSGraphicsContext's saveGraphicsState()
###生成された画像でNSGraphicsContext初期化
(refMe's NSGraphicsContext's setCurrentContext:(refMe's NSGraphicsContext's graphicsContextWithBitmapImageRep:(ocidBitmapImageRep)))
###塗り色
ocidSetColor's |set|()
ocidText's drawAtPoint:(ocidTextOrigin) withAttributes:(ocidTextAttr)
####画像作成終了
refMe's NSGraphicsContext's restoreGraphicsState()

###################################
#####保存オプション PNG
###################################
set ocidFileType to refMe's NSBitmapImageFileTypePNG
set ocidProperties to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
###インターレース
ocidProperties's setObject:false forKey:(refMe's NSImageInterlaced)
###ガンマ
ocidProperties's setObject:(1 / 2.2 as number) forKey:(refMe's NSImageGamma)
####NSImageColorSyncProfileData カラースペース
set ocidColorSpace to refMe's NSColorSpace's displayP3ColorSpace()
set ocidColorSpaceData to ocidColorSpace's colorSyncProfile()
###プロファイルを付ける
ocidProperties's setObject:(ocidColorSpaceData) forKey:(refMe's NSImageColorSyncProfileData)
####出力用データに変換
set ocidNSInlineData to (ocidBitmapImageRep's representationUsingType:(ocidFileType) |properties|:(ocidProperties))
###################################
#####保存
###################################
set boolDone to (ocidNSInlineData's writeToURL:ocidFilePathURL options:(refMe's NSDataWritingAtomic) |error|:(reference))



|

[NSFont] NSFont

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
#                       com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKit"
use scripting additions

property refMe : a reference to current application


set ocidFontManager to refMe's NSFontManager's sharedFontManager()

set ocidFontObject to refMe's NSFont's systemFontSize()
log ocidFontObject as integer
-->(*13*)

set ocidFontObject to refMe's NSFont's smallSystemFontSize()
log ocidFontObject as integer
-->(*11*)

set ocidOsaka to refMe's NSFont's fontWithName:"Osaka-mono" |size|:16

log ocidOsaka's pointSize()
-->(*16.0*)
log ocidOsaka's fixedPitch as boolean
-->(*true*)
log (ocidOsaka's mostCompatibleStringEncoding()) as real
-->(*2.147483649E+9*)
log (ocidOsaka's fontDescriptor())'s fontAttributes() as record
-->(*NSFontSizeAttribute:16.0, NSFontNameAttribute:Osaka-Mono*)

|

[NSFont] NSFontManager

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
#                       com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKit"
use scripting additions

property refMe : a reference to current application


set ocidFontManager to refMe's NSFontManager's sharedFontManager()


set ocidFontNameArray to ocidFontManager's availableFonts()
log ocidFontNameArray as list
-->フォント名のリスト


set ocidFontFamilyArray to ocidFontManager's availableFontFamilies()
log ocidFontFamilyArray as list
-->フォントファミリー名のリスト

repeat with itemFontFamilyArray in ocidFontFamilyArray
    
    set ocidFamilyFontArray to (ocidFontManager's availableMembersOfFontFamily:itemFontFamilyArray)
    log ocidFamilyFontArray as list
    -->フォントファミリーの構成フォント
    set numCntFontFamily to count of ocidFamilyFontArray
    set numCntFontNo to 0 as integer
    repeat numCntFontFamily times
        set ocidFontArray to (ocidFamilyFontArray's objectAtIndex:numCntFontNo)
        log (ocidFontArray's objectAtIndex:0) as text
        -->POST SCRIPT NAME
        log (ocidFontArray's objectAtIndex:1) as text
        -->SUB NAME
        log (ocidFontArray's objectAtIndex:2) as text
        -->フォントのウェイト 1<-->12
        log (ocidFontArray's objectAtIndex:3) as text
        -->フォントの種類
        (*
log refMe's NSBoldFontMask as integer
-->(*2*)
log refMe's NSCompressedFontMask as integer
-->(*512*)
log refMe's NSCondensedFontMask as integer
-->(*64*)
log refMe's NSExpandedFontMask as integer
-->(*32*)
log refMe's NSFixedPitchFontMask as integer
-->(*1024*)
log refMe's NSItalicFontMask as integer
-->(*1*)
log refMe's NSNarrowFontMask as integer
-->(*16*)
log refMe's NSNonStandardCharacterSetFontMask as integer
-->(*8*)
log refMe's NSPosterFontMask as integer
-->(*256*)
log refMe's NSSmallCapsFontMask as integer
-->(*128*)
log refMe's NSUnboldFontMask as integer
-->(*4*)
log refMe's NSUnitalicFontMask as integer
-->(*16777216*)
        
        *)
        set numCntFontNo to numCntFontNo + 1 as integer
    end repeat
end repeat


###等幅
set ocidFontTraits to refMe's NSFixedPitchFontMask
###等幅のリスト
set ocidFontTraitsArray to ocidFontManager's availableFontNamesWithTraits:ocidFontTraits
log ocidFontTraitsArray as list
-->フォント名のリスト


|

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat AddOn Acrobat Annotation Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat JS Acrobat Manifest Acrobat Menu Acrobat Open Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat python Acrobat Reader Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin Permission Admin Pkg Admin Power Management Admin Printer Admin SetUp Admin SMB Admin Support Admin System Information Admin Tools Admin Users Admin Volumes Adobe Adobe FDKO Adobe RemoteUpdateManager AppKit Apple AppleScript AppleScript do shell script AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Script Editor AppleScript Script Menu AppleScript Shortcuts AppleScript Shortcuts Events AppleScript System Events AppleScript System Events Plist AppleScript Video Applications AppStore Archive Attributes Automator BackUp Barcode Barcode QR Barcode QR Decode Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome CIImage CityCode CloudStorage Color com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Device Diff Disk Dock DropBox Droplet eMail Encode % Encode Decode Encode UTF8 Error EXIFData ffmpeg File Finder Firefox Folder FolderAction Fonts GIF github Guide HTML HTML Entity Icon Illustrator Image Events Image2PDF ImageOptim iPhone iWork Javascript Jedit Json Label Leading Zero List locationd LRC lsappinfo LSSharedFileList m3u8 Mail MakePDF Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Mouse Music NetWork Notes NSArray NSArray Sort NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSColor NSColorList NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSPrintOperation NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth OneDrive PDF PDFAnnotation PDFAnnotationWidget PDFContext PDFDisplayBox PDFDocumentPermissions PDFImageRep PDFKit PDFnUP PDFOutline perl Photoshop PlistBuddy pluginkit postalcode PostScript prefPane Preview Python QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver SF Symbols character id SF Symbols Entity sips Skype Slack Sound Spotlight sqlite SRT StandardAdditions Swift System Settings TCC TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom webarchive webp Wifi Windows XML XML EPUB XML OPML XML Plist XML RSS XML savedSearch XML SVG XML TTML XML webloc XML XMP YouTube zoom