Summary: | Spurious "out of memory" error on system without fonts | ||
---|---|---|---|
Product: | cairo | Reporter: | Ben Bullock <benkasminbullock> |
Component: | freetype font backend | Assignee: | David Turner <david> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | trivial | ||
Priority: | medium | ||
Version: | 1.8.8 | ||
Hardware: | x86 (IA32) | ||
OS: | FreeBSD | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ben Bullock
2009-06-18 18:00:21 UTC
Thanks for the bug report, it reminded that one of the arguments for including a builtin font was precisely so we could fallback and always show text (even if it was completely the wrong font!) The fix is relatively easy for 1.9, but requires a fair bit more backporting for 1.8. I'm not sure the necessity justifies the extra risk. commit d3330d7beba0e0d2543e40a0e0e4d81ea9a78b45 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Jun 19 11:15:30 2009 +0100 [ft] Substitute twin if there are no fonts Fixes bug 22356 -- Spurious "out of memory" error on system without fonts https://bugs.freedesktop.org/show_bug.cgi?id=22356 If FcFontMatch() fails, then it means that there are no fonts available on the system (or it may have been a malloc error, we have no way of telling). Instead of report NO_MEMORY and disabling all drawing, one of the rationales for including a builtin font was so that we could continue even in the face of this error and show *something* to the user. (This being a last resort (and especially important for demos!) and hopefully easier to diagnose than no output at all.) |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.