Skip to content
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

dynamic font size for messages #48

Closed
mwurm293 opened this issue Dec 13, 2023 · 3 comments
Closed

dynamic font size for messages #48

mwurm293 opened this issue Dec 13, 2023 · 3 comments

Comments

@mwurm293
Copy link

Love this repo. Impressive work.

How would i add dynamic font size for messages for people with bad eyes?

My users are mostly >50 years old. I see that font size of 15 is hardcoded on MessageView.swift line36. I love everything else about the MessageView, and definitely want to avoid implementing a custom messageBuilder if i can help it.

@f3dm76
Copy link
Collaborator

f3dm76 commented Dec 14, 2023

Hey @mwurm293, this is a great idea - I'm thinking of using
UIFontMetrics.default.scaledFont(for: UIFont.systemFont(ofSize: 15))
instead or would adding a parameter to pass custom font size work better for you?

@mwurm293
Copy link
Author

im not familiar with that font type, so would have to test. I do think it would be helpful to be able to pass a custom font size. for reference, i will just be passing Font(.body).

If you're open to it, i have two other suggestions:

  1. a color parameter for MessageTimeView's text. Currently its .foregroundColor(isCurrentUser ? .white : .black) which isn't legible for messages not from currentUser and in a dark theme.
  2. a parameter showMessageTimeView that can hide the messageTimeView. I have some use cases for chat that dont make sense to show the time.

I appreciate your time helping.

@f3dm76
Copy link
Collaborator

f3dm76 commented Mar 7, 2024

Hey @mwurm293 , please check out version 1.3.7 where you can pass a custom UIFont to use for messages. Have a great day!

@f3dm76 f3dm76 closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants