#include <ApplicationServices/ApplicationServices.h>
#include "hb.h"
-namespace WebCore {
+namespace blink {
static hb_position_t floatToHarfBuzzPosition(CGFloat value)
{
static hb_blob_t* harfBuzzCoreTextGetTable(hb_face_t* face, hb_tag_t tag, void* userData)
{
CGFontRef cgFont = reinterpret_cast<CGFontRef>(userData);
+ if (!cgFont)
+ return 0;
CFDataRef cfData = CGFontCopyTableForTag(cgFont, tag);
if (!cfData)
return 0;
{
hb_font_t* font = hb_font_create(m_face);
hb_font_set_funcs(font, harfBuzzCoreTextGetFontFuncs(), m_platformData, 0);
- const float size = m_platformData->m_size;
+ const float size = m_platformData->m_textSize;
hb_font_set_ppem(font, size, size);
const int scale = (1 << 16) * static_cast<int>(size);
hb_font_set_scale(font, scale, scale);
return font;
}
-} // namespace WebCore
+} // namespace blink