Command line to generate R2Font
This commit is contained in:
27
Sources/FontToolCore/FontToolError.swift
Normal file
27
Sources/FontToolCore/FontToolError.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Thibaut Schmitt on 13/12/2021.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
enum FontToolError: Error {
|
||||
case fcScan(String, Int32, String?)
|
||||
case inputFolderNotFound(String)
|
||||
|
||||
var description: String {
|
||||
switch self {
|
||||
case .fcScan(let path, let code, let output):
|
||||
return """
|
||||
Error while getting fontName (fc-scan --format %{postscriptname} \(path).
|
||||
fc-scan exit with \(code) and output is: \(output ?? "no output")
|
||||
"""
|
||||
|
||||
case .inputFolderNotFound(let inputFolder):
|
||||
return "Input folder not found: \(inputFolder)"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user