Repository Public License
1// swift-tools-version: 6.02// ORIX Convert — Packages/EngineFont/Package.swift3// Description: Font engine of ORIX Convert (TTF, OTF, WOFF, WOFF2): own sfnt / WOFF code in Swift, WOFF2 through the4// bundled google/woff2 + brotli (EmbeddedEngines/woff2/build.sh must have produced CWOFF2.xcframework).5// Author: Simon-Pierre Boucher — contact@spboucher.ai6import PackageDescription78let package = Package(9 name: "EngineFont",10 platforms: [.macOS(.v15)],11 products: [.library(name: "EngineFont", targets: ["EngineFont"])],12 dependencies: [.package(path: "../ORIXConvertCore")],13 targets: [14 .binaryTarget(name: "CWOFF2", path: "../../EmbeddedEngines/woff2/CWOFF2.xcframework"),15 // Thin C interface over the C++ woff2 library, so that Swift never sees C++ headers.16 .target(name: "CWOFF2Shim", dependencies: ["CWOFF2"], cxxSettings: [.define("NDEBUG")],17 linkerSettings: [.linkedLibrary("c++")]),18 .target(19 name: "EngineFont",20 dependencies: [.product(name: "ConvertCore", package: "ORIXConvertCore"), "CWOFF2Shim"],21 linkerSettings: [.linkedLibrary("z")]22 ),23 .testTarget(name: "EngineFontTests", dependencies: ["EngineFont", .product(name: "ConvertCore", package: "ORIXConvertCore")]),24 ],25 cxxLanguageStandard: .cxx1426)27