-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] ♻️ Enabled to use ttf files placed in commonMain on iOS. #1047
[iOS] ♻️ Enabled to use ttf files placed in commonMain on iOS. #1047
Conversation
// FIXME We initially planned to use this implementation on the iOS side. | ||
//However, when shared.swift is output by XCFramework, methods with Compose annotations are not output. | ||
//Therefore, this implementation cannot be referenced from the iOS side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Actual method cannot be referenced from the iOS side.
In this case, SwiftGen shares the custom font by referencing the ttf file placed in commonMain.
Please let me know if this is wrong and I will try to fix it.
Hi @Corvus400! Codes seem to be unformatted. To resolve this issue, please run |
On the Android side, I think it is good. @ry-itto Do you have any opinion on this? |
@ry-itto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost LGTM! Please check some reviews!
fonts: | ||
inputs: ../../../../../core/designsystem/src/commonMain/resources/font | ||
outputs: | ||
templateName: swift5 | ||
output: Fonts.swift | ||
params: | ||
enumName: FontAssets | ||
publicAccess: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you introduce font with Theme
module? 👀
I think font is related to theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ry-itto
Please let me confirm. 🙇
Does this mean you want it defined in Theme/swiftgen.yml instead of Assets/swiftgen.yml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean you want it defined in Theme/swiftgen.yml instead of Assets/swiftgen.yml?
Yes 🙏🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ry-itto
Thank you very much for your patience. 🙇
Fixed to have Font resource in Theme.
import Navigation | ||
import SwiftUI | ||
import Assets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please sort import orders 🙏🏼
I think SwiftLint warns this line when build iOS App.
@takahirom @ry-itto |
…ets/swiftgen.yml.
@@ -122,14 +122,17 @@ public struct AboutView<ContributorView: View, StaffView: View, SponsorView: Vie | |||
.padding(.vertical, 24) | |||
|
|||
Text("アプリバージョン") | |||
.font(Font.system(size: 14, weight: .medium)) | |||
.font(Font.custom(FontAssets.Montserrat.medium, size: 14)) | |||
.fontWeight(.medium) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q]
FontAssets.Montserrat.medium
seems a medium-sized font, so is this modifier redundant? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkhs0604
I was using the original description as is, so I certainly don't need this modifier.
I have removed it!🫡
@@ -34,16 +34,19 @@ public struct InformationRow: View { | |||
icon | |||
HStack(spacing: 12) { | |||
Text(title) | |||
.font(Font.system(size: 14, weight: .semibold)) | |||
.font(Font.custom(FontAssets.Montserrat.medium, size: 14)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q]
We can embed Montserrat-SemiBold.ttf
too, so how about using it instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your great contribution on not only Android but also iOS!
LGTM, and @ry-itto's points have also been resolved, so let me merge it!
Issue
Montserrat
#888Overview (Required)
Screenshot