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) 2013 BlackBerry Limited. All rights reserved. | 3 * Copyright (C) 2013 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 820 |
821 HarfBuzzRunCache& runCache = harfBuzzRunCache(); | 821 HarfBuzzRunCache& runCache = harfBuzzRunCache(); |
822 const FontDescription& fontDescription = m_font->fontDescription(); | 822 const FontDescription& fontDescription = m_font->fontDescription(); |
823 const String& localeString = fontDescription.locale(); | 823 const String& localeString = fontDescription.locale(); |
824 CString locale = localeString.latin1(); | 824 CString locale = localeString.latin1(); |
825 | 825 |
826 for (unsigned i = 0; i < m_harfBuzzRuns.size(); ++i) { | 826 for (unsigned i = 0; i < m_harfBuzzRuns.size(); ++i) { |
827 unsigned runIndex = m_run.rtl() ? m_harfBuzzRuns.size() - i - 1 : i; | 827 unsigned runIndex = m_run.rtl() ? m_harfBuzzRuns.size() - i - 1 : i; |
828 HarfBuzzRun* currentRun = m_harfBuzzRuns[runIndex].get(); | 828 HarfBuzzRun* currentRun = m_harfBuzzRuns[runIndex].get(); |
829 const SimpleFontData* currentFontData = currentRun->fontData(); | 829 const SimpleFontData* currentFontData = currentRun->fontData(); |
830 if (currentFontData->isSVGFont()) | |
831 return false; | |
832 | 830 |
833 FontPlatformData* platformData = const_cast<FontPlatformData*>(¤tF
ontData->platformData()); | 831 FontPlatformData* platformData = const_cast<FontPlatformData*>(¤tF
ontData->platformData()); |
834 HarfBuzzFace* face = platformData->harfBuzzFace(); | 832 HarfBuzzFace* face = platformData->harfBuzzFace(); |
835 if (!face) | 833 if (!face) |
836 return false; | 834 return false; |
837 | 835 |
838 hb_buffer_set_language(harfBuzzBuffer.get(), hb_language_from_string(loc
ale.data(), locale.length())); | 836 hb_buffer_set_language(harfBuzzBuffer.get(), hb_language_from_string(loc
ale.data(), locale.length())); |
839 hb_buffer_set_script(harfBuzzBuffer.get(), currentRun->script()); | 837 hb_buffer_set_script(harfBuzzBuffer.get(), currentRun->script()); |
840 hb_buffer_set_direction(harfBuzzBuffer.get(), currentRun->direction()); | 838 hb_buffer_set_direction(harfBuzzBuffer.get(), currentRun->direction()); |
841 | 839 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 fromX = 0; | 1144 fromX = 0; |
1147 if (!foundToX) | 1145 if (!foundToX) |
1148 toX = m_run.rtl() ? 0 : m_totalWidth; | 1146 toX = m_run.rtl() ? 0 : m_totalWidth; |
1149 | 1147 |
1150 if (fromX < toX) | 1148 if (fromX < toX) |
1151 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); | 1149 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); |
1152 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); | 1150 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); |
1153 } | 1151 } |
1154 | 1152 |
1155 } // namespace blink | 1153 } // namespace blink |
OLD | NEW |