Skip to content

Commit

Permalink
修复字体会随系统变化的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhuoyuan committed Jan 9, 2019
1 parent 013e862 commit f1546d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ Height is enlarged relative to the design draft => The ratio of height width to

setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling
? setWidth(fontSize) * _textScaleFactor
: setWidth(fontSize);
: setWidth(fontSize);

## [0.4.4] - Fix bugs that default fonts change with the system
4 changes: 2 additions & 2 deletions lib/flutter_screenutil.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ class ScreenUtil {
///@param allowFontScaling 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为true。
///@param allowFontScaling Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true.
setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling
? setWidth(fontSize) * _textScaleFactor
: setWidth(fontSize);
? setWidth(fontSize)
: setWidth(fontSize) / _textScaleFactor;
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_screenutil
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version: 0.4.3
version: 0.4.4
author: LiZhuoyuan <zhuoyuan93@gmail.com>
homepage: https://github.com/OpenFlutter/flutter_ScreenUtil

Expand Down

0 comments on commit f1546d4

Please sign in to comment.