File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Sources/YMatterType/Typography Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,24 @@ public protocol FontRepresentable {
5656 func accessibilityBoldWeight( for weight: Typography . FontWeight ) -> Typography . FontWeight
5757}
5858
59+ extension Typography {
60+ fileprivate static let logger = Logger ( subsystem: " YMatterType " , category: " fonts " )
61+ }
62+
5963// MARK: - Default implementations
6064
6165extension FontRepresentable {
6266 public var fontNameSuffix : String { " " }
63-
67+
6468 public func font(
6569 for weight: Typography . FontWeight ,
6670 pointSize: CGFloat ,
6771 compatibleWith traitCollection: UITraitCollection ?
6872 ) -> UIFont {
6973 let name = fontName ( for: weight, compatibleWith: traitCollection)
7074 guard let font = UIFont ( name: name, size: pointSize) else {
71- // Fallback to system font
72- print ( " Custom font \( name) not properly installed " )
75+ // Fallback to system font and log a message.
76+ Typography . logger . warning ( " Custom font \( name) not properly installed. " )
7377 return FontInfo . system. font (
7478 for: weight,
7579 pointSize: pointSize,
You can’t perform that action at this time.
0 commit comments