| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 float beforeWidth = controller.runWidthSoFar(); | 78 float beforeWidth = controller.runWidthSoFar(); |
| 79 controller.advance(runInfo.to, &glyphBuffer); | 79 controller.advance(runInfo.to, &glyphBuffer); |
| 80 | 80 |
| 81 if (glyphBuffer.isEmpty()) | 81 if (glyphBuffer.isEmpty()) |
| 82 return 0; | 82 return 0; |
| 83 | 83 |
| 84 float afterWidth = controller.runWidthSoFar(); | 84 float afterWidth = controller.runWidthSoFar(); |
| 85 | 85 |
| 86 if (runInfo.run.rtl()) { | 86 if (runInfo.run.rtl()) { |
| 87 initialAdvance = controller.totalWidth() + controller.finalRoundingWidth
() - afterWidth; | 87 initialAdvance = controller.totalWidth() + controller.finalRoundingWidth
() - afterWidth; |
| 88 glyphBuffer.reverse(0, glyphBuffer.size()); | 88 glyphBuffer.reverse(); |
| 89 } else | 89 } else |
| 90 initialAdvance = beforeWidth; | 90 initialAdvance = beforeWidth; |
| 91 | 91 |
| 92 return initialAdvance; | 92 return initialAdvance; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void Font::drawComplexText(GraphicsContext* context, const TextRunPaintInfo& run
Info, const FloatPoint& point) const | 95 void Font::drawComplexText(GraphicsContext* context, const TextRunPaintInfo& run
Info, const FloatPoint& point) const |
| 96 { | 96 { |
| 97 if (preferHarfBuzz(this)) { | 97 if (preferHarfBuzz(this)) { |
| 98 GlyphBuffer glyphBuffer; | 98 GlyphBuffer glyphBuffer; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return simpleFontData; | 203 return simpleFontData; |
| 204 } | 204 } |
| 205 | 205 |
| 206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) | 206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) |
| 207 return baseCharacterGlyphData.fontData; | 207 return baseCharacterGlyphData.fontData; |
| 208 | 208 |
| 209 return SimpleFontData::systemFallback(); | 209 return SimpleFontData::systemFallback(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace WebCore | 212 } // namespace WebCore |
| OLD | NEW |