| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (c) 2014 BlackBerry Limited. All rights reserved. | 3 * Copyright (c) 2014 BlackBerry Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "platform/fonts/harfbuzz/HarfBuzzFace.h" | 33 #include "platform/fonts/harfbuzz/HarfBuzzFace.h" |
| 34 | 34 |
| 35 #include "SkPaint.h" | 35 #include "SkPaint.h" |
| 36 #include "SkPath.h" | 36 #include "SkPath.h" |
| 37 #include "SkPoint.h" | 37 #include "SkPoint.h" |
| 38 #include "SkRect.h" | 38 #include "SkRect.h" |
| 39 #include "SkTypeface.h" | 39 #include "SkTypeface.h" |
| 40 #include "SkUtils.h" | 40 #include "SkUtils.h" |
| 41 #include "platform/fonts/FontPlatformData.h" | 41 #include "platform/fonts/FontPlatformData.h" |
| 42 #include "platform/fonts/SimpleFontData.h" | 42 #include "platform/fonts/SimpleFontData.h" |
| 43 #include "platform/fonts/GlyphBuffer.h" | |
| 44 #include "platform/fonts/harfbuzz/HarfBuzzShaper.h" | 43 #include "platform/fonts/harfbuzz/HarfBuzzShaper.h" |
| 45 | 44 |
| 46 #include "hb.h" | 45 #include "hb.h" |
| 47 #include "wtf/HashMap.h" | 46 #include "wtf/HashMap.h" |
| 48 | 47 |
| 49 namespace WebCore { | 48 namespace WebCore { |
| 50 | 49 |
| 51 // Our implementation of the callbacks which HarfBuzz requires by using Skia | 50 // Our implementation of the callbacks which HarfBuzz requires by using Skia |
| 52 // calls. See the HarfBuzz source for references about what these callbacks do. | 51 // calls. See the HarfBuzz source for references about what these callbacks do. |
| 53 | 52 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 hb_font_t* font = hb_font_create(m_face); | 228 hb_font_t* font = hb_font_create(m_face); |
| 230 hb_font_set_funcs(font, harfBuzzSkiaGetFontFuncs(), hbFontData, destroyHarfB
uzzFontData); | 229 hb_font_set_funcs(font, harfBuzzSkiaGetFontFuncs(), hbFontData, destroyHarfB
uzzFontData); |
| 231 float size = m_platformData->size(); | 230 float size = m_platformData->size(); |
| 232 int scale = SkiaScalarToHarfBuzzPosition(size); | 231 int scale = SkiaScalarToHarfBuzzPosition(size); |
| 233 hb_font_set_scale(font, scale, scale); | 232 hb_font_set_scale(font, scale, scale); |
| 234 hb_font_make_immutable(font); | 233 hb_font_make_immutable(font); |
| 235 return font; | 234 return font; |
| 236 } | 235 } |
| 237 | 236 |
| 238 } // namespace WebCore | 237 } // namespace WebCore |
| OLD | NEW |