Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit 0e40376

Browse files
committed
Fixed UIFont dropping family/weight
1 parent 8aaf61d commit 0e40376

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

AMXFontAutoScale.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Pod::Spec.new do |s|
33

44
s.name = "AMXFontAutoScale"
5-
s.version = "1.0.0"
5+
s.version = "1.0.1"
66
s.summary = "Scale the font for UILabel and UITextView proportionally across all the screen sizes."
77

88
s.description = <<-DESC
@@ -15,11 +15,11 @@ Pod::Spec.new do |s|
1515
s.authors = { "Alex Maimescu" => "maimescu.alex@gmail.com" }
1616

1717
s.platform = :ios
18-
s.ios.deployment_target = '9.0'
18+
s.ios.deployment_target = '8.0'
1919

2020
s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-lObjC' }
2121

2222
s.source = { :git => "https://github.com/alexmx/AMXFontAutoScale.git", :tag => "v#{s.version}" }
2323
s.source_files = "AMXFontAutoScale/**/*.{h,m,swift}"
2424

25-
end
25+
end

AMXFontAutoScale.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
367367
GCC_WARN_UNUSED_FUNCTION = YES;
368368
GCC_WARN_UNUSED_VARIABLE = YES;
369-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
369+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
370370
MTL_ENABLE_DEBUG_INFO = YES;
371371
ONLY_ACTIVE_ARCH = YES;
372372
SDKROOT = iphoneos;
@@ -411,7 +411,7 @@
411411
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
412412
GCC_WARN_UNUSED_FUNCTION = YES;
413413
GCC_WARN_UNUSED_VARIABLE = YES;
414-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
414+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
415415
MTL_ENABLE_DEBUG_INFO = NO;
416416
SDKROOT = iphoneos;
417417
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

AMXFontAutoScale/UIFont+AMXFontScale.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ - (instancetype)amx_scaleForReferenceScreenSize:(AMXScreenSize)screenSize
1616
UIFont *finalFont = self;
1717

1818
if (multiplier != 1) {
19-
finalFont = [self fontWithSize:(self.pointSize * multiplier)];
19+
finalFont = [UIFont fontWithDescriptor:self.fontDescriptor size:(self.pointSize * multiplier)];
2020
}
2121

2222
return finalFont;

0 commit comments

Comments
 (0)