Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2bdd78d
Remove unused style code.
SergioEstevao Oct 2, 2019
30f661e
Add color converter and tests
SergioEstevao Oct 2, 2019
246ccf1
Merge pull request #1215 from wordpress-mobile/issue/703_fix_color_st…
SergioEstevao Oct 4, 2019
73d74f1
CircleCI: Publish pods when the repo is tagged
jtreanor Oct 4, 2019
f9ff2d3
Merge pull request #1219 from wordpress-mobile/circleci-publish
jtreanor Oct 7, 2019
1f47ac8
Allow dynamic change of default font.
SergioEstevao Oct 7, 2019
ae81f1c
CircleCI: Use --include-podspecs when validating WordPress-Editor-iOS…
jtreanor Oct 8, 2019
efc0760
Remove unused code.
SergioEstevao Oct 8, 2019
cdb2814
Use font provider class to provide default fonts
SergioEstevao Oct 8, 2019
b155e7d
Make font properties public
SergioEstevao Oct 8, 2019
1994a24
Update code for iOS 11
SergioEstevao Oct 8, 2019
4aa260a
Use published Orb
jtreanor Oct 9, 2019
7f998f4
Improve and generalize code for replacement of fonts in attributed st…
SergioEstevao Oct 9, 2019
31e70a0
Make font provider shared instance public
SergioEstevao Oct 9, 2019
3d0c2e8
Improve replaceFont code and add some documentation.
SergioEstevao Oct 9, 2019
1b53a74
Merge pull request #1220 from wordpress-mobile/circleci-validate
jtreanor Oct 9, 2019
7eddd37
Fix possible issues were font is not available.
SergioEstevao Oct 9, 2019
dcf6ec9
Merge branch 'issue/allow_change_of_default_font' into issue/update_x…
SergioEstevao Oct 9, 2019
f7561ef
Convert to let variables.
SergioEstevao Oct 9, 2019
46ac801
Add documentation.
SergioEstevao Oct 9, 2019
fa4c640
Fix test
SergioEstevao Oct 9, 2019
dfb037f
Merge branch 'issue/allow_change_of_default_font' into issue/update_x…
SergioEstevao Oct 9, 2019
181ebc7
Merge pull request #1221 from wordpress-mobile/issue/allow_change_of_…
SergioEstevao Oct 9, 2019
7035a6a
Merge branch 'develop' into issue/update_xcode_ios_version
SergioEstevao Oct 9, 2019
81e1e1b
Merge pull request #1222 from wordpress-mobile/issue/update_xcode_ios…
SergioEstevao Oct 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix possible issues were font is not available.
  • Loading branch information
SergioEstevao committed Oct 9, 2019
commit 7eddd3733a4e0983e3995437fc4a715db7e65b66
8 changes: 6 additions & 2 deletions Aztec/Classes/TextKit/LayoutManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ private extension LayoutManager {
traits.remove(.traitBold)
traits.remove(.traitItalic)

let descriptor = font.fontDescriptor.withSymbolicTraits(traits)
return UIFont(descriptor: descriptor!, size: font.pointSize)
if let descriptor = font.fontDescriptor.withSymbolicTraits(traits) {
return UIFont(descriptor: descriptor, size: font.pointSize)
} else {
// Don't touch the font if we cannot remove the symbolic traits.
return font
}
}
}