Merge branch 'master' into jgrpp
# Conflicts: # src/fontcache.cpp # src/openttd.cpp # src/os/macosx/font_osx.cpp # src/os/unix/font_unix.cpp # src/os/windows/font_win32.cpp # src/strings.cpp
This commit is contained in:
@@ -57,7 +57,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
|
||||
}
|
||||
|
||||
if (os_err == noErr) {
|
||||
DEBUG(freetype, 3, "Font path for %s: %s", font_name, file_path);
|
||||
DEBUG(fontcache, 3, "Font path for %s: %s", font_name, file_path);
|
||||
err = FT_New_Face(_library, (const char *)file_path, 0, face);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
|
||||
#endif /* WITH_FREETYPE */
|
||||
|
||||
|
||||
bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, int winlangid, MissingGlyphSearcher *callback)
|
||||
bool SetFallbackFont(FontCacheSettings *settings, const char *language_isocode, int winlangid, MissingGlyphSearcher *callback)
|
||||
{
|
||||
/* Determine fallback font using CoreText. This uses the language isocode
|
||||
* to find a suitable font. CoreText is available from 10.5 onwards. */
|
||||
@@ -134,7 +134,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
|
||||
/* Save result. */
|
||||
callback->SetFontNames(settings, name);
|
||||
if (!callback->FindMissingGlyphs()) {
|
||||
DEBUG(freetype, 2, "CT-Font for %s: %s", language_isocode, name);
|
||||
DEBUG(fontcache, 2, "CT-Font for %s: %s", language_isocode, name);
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ void CoreTextFontCache::SetFontSize(int pixels)
|
||||
CFStringGetCString(font_name.get(), name, lengthof(name), kCFStringEncodingUTF8);
|
||||
this->font_name = name;
|
||||
|
||||
DEBUG(freetype, 2, "Loaded font '%s' with size %d", this->font_name.c_str(), pixels);
|
||||
DEBUG(fontcache, 2, "Loaded font '%s' with size %d", this->font_name.c_str(), pixels);
|
||||
}
|
||||
|
||||
GlyphID CoreTextFontCache::MapCharToGlyph(WChar key)
|
||||
@@ -352,13 +352,13 @@ void LoadCoreTextFont(FontSize fs)
|
||||
{
|
||||
static const char *SIZE_TO_NAME[] = { "medium", "small", "large", "mono" };
|
||||
|
||||
FreeTypeSubSetting *settings = nullptr;
|
||||
FontCacheSubSetting *settings = nullptr;
|
||||
switch (fs) {
|
||||
default: NOT_REACHED();
|
||||
case FS_SMALL: settings = &_freetype.small; break;
|
||||
case FS_NORMAL: settings = &_freetype.medium; break;
|
||||
case FS_LARGE: settings = &_freetype.large; break;
|
||||
case FS_MONO: settings = &_freetype.mono; break;
|
||||
case FS_SMALL: settings = &_fcsettings.small; break;
|
||||
case FS_NORMAL: settings = &_fcsettings.medium; break;
|
||||
case FS_LARGE: settings = &_fcsettings.large; break;
|
||||
case FS_MONO: settings = &_fcsettings.mono; break;
|
||||
}
|
||||
|
||||
if (settings->font.empty()) return;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#ifndef FONT_OSX_H
|
||||
#define FONT_OSX_H
|
||||
|
||||
#include "../../fontcache_internal.h"
|
||||
#include "../../fontcache/truetypefontcache.h"
|
||||
#include "os/macosx/macos.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
Reference in New Issue
Block a user