// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPING_LINE_BREAKER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPING_LINE_BREAKER_H_ #include <optional> #include "third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h" #include "third_party/blink/renderer/platform/fonts/shaping/shape_options.h" #include "third_party/blink/renderer/platform/fonts/shaping/text_spacing_trim.h" #include "third_party/blink/renderer/platform/geometry/layout_unit.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/text/text_direction.h" #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" namespace blink { class Font; class ShapeResult; class ShapeResultView; class Hyphenation; class LazyLineBreakIterator; // Shapes a line of text by finding the ideal break position as indicated by the // available space and the shape results for the entire paragraph. Once an ideal // break position has been found the text is scanned backwards until a valid and // and appropriate break opportunity is identified. Unless the break opportunity // is at a safe-to-break boundary (as identified by HarfBuzz) the beginning and/ // or end of the line is reshaped to account for differences caused by breaking. // // This allows for significantly faster and more efficient line breaking by only // reshaping when absolutely necessarily and by only evaluating likely candidate // break opportunities instead of measuring and evaluating all possible options. class PLATFORM_EXPORT ShapingLineBreaker { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPING_LINE_BREAKER_H_