Opened 14 years ago

Last modified 9 months ago

#6451 new bug

StyledEdit ignores font family if "regular" style not available

Reported by: dru_ed Owned by: korli
Priority: normal Milestone: R1
Component: Applications/StyledEdit Version: R1/Development
Keywords: fonts, stylededit Cc:
Blocked By: Blocking:
Platform: All

Description

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.

To Reproduce:

  1. Create a test document in StyledEdit using a font in two (Regular & Bold) styles.
  2. Save the test document and close it.
  3. Move the .TTF font file for the "Regular" version out of ~/config/data/fonts
  4. Reopen the test document
  5. Observe StyledEdit now ignores the Font Family and renders all text in the Styles using the default font.
  6. Close the test document
  7. Put the .TTF font file back in ~/config/data/fonts
  8. Re-Open the test document
  9. 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.

Attachments (1)

stylededitfontfailure.png (35.5 KB ) - added by dru_ed 14 years ago.

Download all attachments as: .zip

Change History (3)

by dru_ed, 14 years ago

Attachment: stylededitfontfailure.png added

comment:1 by jackburton, 9 months ago

Could this have been fixed? By #15764 maybe?

comment:2 by nephele, 9 months ago

Probably by https://cgit.haiku-os.org/haiku/commit/src/servers/app/font/GlyphLayoutEngine.h?id=7a8d5a2db3214be378c4450bd94e07db75d5e240

This is a quite old ticket in any case, lots has changed in that space since then.

Note: See TracTickets for help on using tickets.