| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 static inline hb_direction_t TextDirectionToHBDirection( | 102 static inline hb_direction_t TextDirectionToHBDirection( |
| 103 TextDirection dir, | 103 TextDirection dir, |
| 104 FontOrientation orientation, | 104 FontOrientation orientation, |
| 105 const SimpleFontData* fontData) { | 105 const SimpleFontData* fontData) { |
| 106 hb_direction_t harfBuzzDirection = | 106 hb_direction_t harfBuzzDirection = |
| 107 isVerticalAnyUpright(orientation) && | 107 isVerticalAnyUpright(orientation) && |
| 108 !fontData->isTextOrientationFallback() | 108 !fontData->isTextOrientationFallback() |
| 109 ? HB_DIRECTION_TTB | 109 ? HB_DIRECTION_TTB |
| 110 : HB_DIRECTION_LTR; | 110 : HB_DIRECTION_LTR; |
| 111 return dir == RTL ? HB_DIRECTION_REVERSE(harfBuzzDirection) | 111 return dir == TextDirection::Rtl ? HB_DIRECTION_REVERSE(harfBuzzDirection) |
| 112 : harfBuzzDirection; | 112 : harfBuzzDirection; |
| 113 } | 113 } |
| 114 | 114 |
| 115 inline bool shapeRange(hb_buffer_t* harfBuzzBuffer, | 115 inline bool shapeRange(hb_buffer_t* harfBuzzBuffer, |
| 116 hb_feature_t* fontFeatures, | 116 hb_feature_t* fontFeatures, |
| 117 unsigned fontFeaturesSize, | 117 unsigned fontFeaturesSize, |
| 118 const SimpleFontData* currentFont, | 118 const SimpleFontData* currentFont, |
| 119 PassRefPtr<UnicodeRangeSet> currentFontRangeSet, | 119 PassRefPtr<UnicodeRangeSet> currentFontRangeSet, |
| 120 UScriptCode currentRunScript, | 120 UScriptCode currentRunScript, |
| 121 hb_direction_t direction, | 121 hb_direction_t direction, |
| 122 hb_language_t language) { | 122 hb_language_t language) { |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 segmentRange.script, !fallbackIterator->hasNext())) | 668 segmentRange.script, !fallbackIterator->hasNext())) |
| 669 DLOG(ERROR) << "Shape result extraction failed."; | 669 DLOG(ERROR) << "Shape result extraction failed."; |
| 670 | 670 |
| 671 hb_buffer_reset(harfBuzzBuffer.get()); | 671 hb_buffer_reset(harfBuzzBuffer.get()); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 return result.release(); | 674 return result.release(); |
| 675 } | 675 } |
| 676 | 676 |
| 677 } // namespace blink | 677 } // namespace blink |
| OLD | NEW |