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

Place holder font is different than the standard font #194

Closed
MrPereir4 opened this issue Nov 2, 2019 · 11 comments
Closed

Place holder font is different than the standard font #194

MrPereir4 opened this issue Nov 2, 2019 · 11 comments

Comments

@MrPereir4
Copy link

When I try to use any of the text fields, the placeholder font is not equal to the app standard one, but when I run the app on iOS 12, works fine, the problem is on iOS 13.

@raulriera
Copy link
Owner

Hi,

Can you please try the master version (either by downloading the code or using Swift Package Manager) and let me know if the problem persists?

@iOSDevFin
Copy link

I have the same issue. I updated my Podfile to

pod 'TextFieldEffects', :git => 'https://github.com/raulriera/TextFieldEffects.git', :branch => 'master'

But it's ignoring any font settings on the textfield. Can you please fix that?

@raulriera
Copy link
Owner

If the code in master is not fixing it, a PR is very welcome. I can't seem to reproduce that problem

@MrPereir4
Copy link
Author

What is PR???

@raulriera
Copy link
Owner

PR = Pull Request, when you contribute code using this website Github

@mprey
Copy link

mprey commented Nov 12, 2019

Having the same issue even on latest master branch

@Majituteniyazov
Copy link

@raulriera please help to solve this problem. I'm on latest master branch. I'm using HoshiTextField and system font is not standard font

@raulriera
Copy link
Owner

Could someone elaborate more on the problem? I can't do anything if I don't see what is wrong, what you are doing, which branch, swift, Xcode, etc. And most importantly, make sure the demo project doesn't reflect the problem you are describing

Screen Shot 2019-11-15 at 9 46 47 AM

@dterekhov
Copy link

dterekhov commented Nov 27, 2019

Hello guys!
I use AkiraTextField type only so I will show an example on it.

AkiraTextField .swift
This function get in parameter for example native ".SFUI-Regular" but returns "Times New Roman" that looks not so nice in my opinion.

private func placeholderFontFromFont(_ font: UIFont) -> UIFont! {
     let smallerFont = UIFont(name: font.fontName, size: font.pointSize * placeholderFontScale)
     return smallerFont
}

I use Storyboard with added AkiraTextField on it.

User Defined Runtime Attributes setup like that:
borderColor = UIColor.clear
placeholderColor = UIColor.white
placeholderFontScale = 0.85

Maybe it can be helpful to debug this edge case.

@edwardkunz
Copy link

@raulriera Having the same font issue and I think it has something to do with iOS 13 or XCode 11.2.
Maybe it is related to this: https://stackoverflow.com/questions/58706570/how-can-i-find-the-source-of-this-font-related-coretext-warning-in-ios13

Error in the log:

CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].

@raulriera
Copy link
Owner

No one has confirmed that this happens in the demo project, can you please verify it there before commenting here? I can't reproduce the issues you are commenting

Screen Shot 2019-12-07 at 12 09 52 PM

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

7 participants