react-native-date-picker icon indicating copy to clipboard operation
react-native-date-picker copied to clipboard

Add prop contentFont for android

Open dumihi313 opened this issue 2 years ago • 4 comments

I added contentFont for custom typeface in content text. It just work for android

dumihi313 avatar Nov 30 '23 04:11 dumihi313

Thanks for the PR! what do you mean by "content" in this context of "contentFont"?

henninghall avatar Dec 03 '23 16:12 henninghall

The end objective is to call super.setContentTextTypeface()

so this 'content' is get from this word setContentTextTypeface(), Does it make sense?

dumihi313 avatar Dec 05 '23 09:12 dumihi313

Thanks once again, some questions:

  1. Can you give an example on how to use this?
  2. Should the prop be the name of the font, a path to a font or a font file?
  3. Where should the font file be placed?
  4. Does it support built in fonts and/or custom ones?
  5. Can we support the android native variant?
  6. Can we support iOS?

henninghall avatar Dec 11 '23 15:12 henninghall

Thanks once again, some questions:

  1. Can you give an example on how to use this? <DatePicker ....... date={date} onDateChange={setDate} contentFont="fonts/NunitoSans-Italic.ttf" />

  2. Should the prop be the name of the font, a path to a font or a font file? It should be location path like "fonts/NunitoSans-Italic.ttf"

  3. Where should the font file be placed? fonts in assets android image

  4. Does it support built in fonts and/or custom ones? yes, as I show on fonts in assets android

  5. Can we support the android native variant? just only for variant ios-clone

6, Can we support iOS?

As I checked, lib use ios native lib so we can not adjust font family, font size as well ...

dumihi313 avatar Dec 20 '23 10:12 dumihi313

iOS clone is no longer supported, this feature could still be useful for the nativeAndroid variant

henninghall avatar Apr 12 '24 08:04 henninghall