-
Notifications
You must be signed in to change notification settings - Fork 553
Description
Description
Currently there are two different sets types being used for fonts, one in Core and one in Types/Font. This causes the need to convert between the two if I want to make something that can take an object with various font details.
For example, say I have an object I want to use that has a fontWeight of 500. Something like:
const labelFont = {
fontSize: 16,
fontWeight: 500,
};If I want to use it as the first param to matchFont, I need fontWeight to be a string so it matches the Weight type. However, if I wish to use that same object to style the font in a Paragraph with Skia.ParagraphBuilder.Make, I need it to be a number, so it matches the FontWeight enum.
It would be nice if there were consistent Font Types that were exported (matchFont's RNFontStyle and its associated types are not exported) and that would work all around.