Opened 10 years ago
StyledEdit ignores font family if "regular" style not available
|Reported by:||dru_ed||Owned by:||korli|
If a document has used multiple styles from one font family, StyledEdit, will ignore styles such as Bold, Italic, etc. if the Regular version was used in the document but not installed when the file was reopened. StyledEdit will fallback to the default font for all text.
Required: A font in various styles (Regular, Bold, Italic, etc.). I used several .TTF font files in different styles of the same font family. They were placed in ~/config/data/fonts.
- Create a test document in StyledEdit using a font in two (Regular & Bold) styles.
- Save the test document and close it.
- Move the .TTF font file for the "Regular" version out of ~/config/data/fonts
- Reopen the test document
- Observe StyledEdit now ignores the Font Family and renders all text in the Styles using the default font.
- Close the test document
- Put the .TTF font file back in ~/config/data/fonts
- Re-Open the test document
- Observe StyledEdit displays the file differently
some times I've seen it display with the correct font family & styles but other times all text is rendered in "Regular" of the correct font family.
Reopening the document or restarting StyledEdit was not enough to restore correct font family & styles. A reboot of Haiku, followed by reopening the document restored the font styles and displayed in the correct family.
It was unclear to me whether the problem only exists on in StyledEdit or in the font system.
BONUS: try the above but at step 3 move the .TTF font file for the "Bold" version out of ~/config/data/fonts instead and observe the differences.