Closed sarathsarah closed 2 years ago
@rafiki270 Please take a look and review it.
Unfortunately there seems to be a problem with loading AwesomePro fonts. In Fonts.swift line 105 & 123, the use of Bundle.module
leads to the NSBundle being <myApp>.app/Awesome_Awesome.bundle
, even though the pro font resource files are saved to Bundle.main
.
is it crashing? I got crash while accessing Font.load() in NSAttributedString+Awesome line 21. Thats why I added Bundle.module there.
It crashes if you try to use the pro font after loading it. The load will just fail silently if it can't find the pro fonts. The issue is that the pro files are in Bundle.main, while the regular font files are in Bundle.module. I believe you need to use Bundle.module only if the passed in bundle is nil, and it's AwesomeSPM.
I have just fixed this issue here: https://github.com/sarathsarah/Awesome/pull/1
@lozhuf Merged your PR. and Thanks ;)
Adding .swiftpm to .gitignore will create issue isn't it?
Added Swift package support tested in Same project as well.