* Added fallback mappings for the default fonts - since we don't save the

mappings yet, that's a good way to test this functionality.
* Turns out the directory of the mappings must be known already - they
  should be added automatically, but I've added them manually for now
  (which is okay for the default system directory).
* Having more than one style with the same family in the mappings didn't
  work as planned - it now does.
* On my current system, time spend in the font manager constructor went
  down from 1.5 secs to around 12000 usecs (and I have only a moderate
  number of fonts installed, or so I thought - looks like the mappings
  were a good idea :-)) - and that directly cuts down the boot time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15580 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-12-19 01:01:04 +00:00
parent bd8c5981aa
commit 1bd3bb1d58
2 changed files with 85 additions and 29 deletions
+4 -2
View File
@@ -69,9 +69,11 @@ class FontManager : public BLooper {
struct font_directory;
struct font_mapping;
void _AddDefaultMapping(const char* family, const char* style, const char* path);
bool _LoadRecentFontMappings();
FontStyle* _GetDefaultStyle(const char *familyName, const char *styleName,
const char *fallbackFamily, const char *fallbackStyle,
status_t _AddMappedFont(const char* family, const char* style = NULL);
FontStyle* _GetDefaultStyle(const char* familyName, const char* styleName,
const char* fallbackFamily, const char* fallbackStyle,
uint16 fallbackFace);
status_t _SetDefaultFonts();
void _AddSystemPaths();