chromium/third_party/skia/modules/skottie/src/text/TextShaper.cpp

/*
 * Copyright 2019 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "modules/skottie/include/TextShaper.h"

#include "include/core/SkCanvas.h"
#include "include/core/SkFontMetrics.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkFontTypes.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTemplates.h"
#include "include/private/base/SkTo.h"
#include "modules/skshaper/include/SkShaper.h"
#include "modules/skshaper/include/SkShaper_factory.h"
#include "modules/skunicode/include/SkUnicode.h"
#include "src/base/SkTLazy.h"
#include "src/base/SkUTF.h"
#include "src/core/SkFontPriv.h"

#include <algorithm>
#include <memory>
#include <numeric>
#include <utility>

#if !defined(SK_DISABLE_LEGACY_SHAPER_FACTORY)
#include "modules/skshaper/utils/FactoryHelpers.h"
#endif

class SkPaint;

usingnamespaceskia_private;

namespace skottie {
namespace {
static bool is_whitespace(char c) {}

// Helper for interfacing with SkShaper: buffers shaper-fed runs and performs
// per-line position adjustments (for external line breaking, horizontal alignment, etc).
class ResultBuilder final : public SkShaper::RunHandler {};

Shaper::Result ShapeImpl(const SkString& txt, const Shaper::TextDesc& desc,
                         const SkRect& box, const sk_sp<SkFontMgr>& fontmgr,
                         const sk_sp<SkShapers::Factory>& shapingFactory,
                         SkSize* shaped_size) {}

bool result_fits(const Shaper::Result& res, const SkSize& res_size,
                 const SkRect& box, const Shaper::TextDesc& desc) {}

Shaper::Result ShapeToFit(const SkString& txt, const Shaper::TextDesc& orig_desc,
                          const SkRect& box, const sk_sp<SkFontMgr>& fontmgr,
                          const sk_sp<SkShapers::Factory>& shapingFactory) {}


// Applies capitalization rules.
class AdjustedText {};

} // namespace

Shaper::Result Shaper::Shape(const SkString& text, const TextDesc& desc, const SkPoint& point,
                             const sk_sp<SkFontMgr>& fontmgr, const sk_sp<SkShapers::Factory>& shapingFactory) {}

Shaper::Result Shaper::Shape(const SkString& text, const TextDesc& desc, const SkRect& box,
                             const sk_sp<SkFontMgr>& fontmgr, const sk_sp<SkShapers::Factory>& shapingFactory) {}

SkRect Shaper::ShapedGlyphs::computeBounds(BoundsType btype) const {}

void Shaper::ShapedGlyphs::draw(SkCanvas* canvas,
                                const SkPoint& origin,
                                const SkPaint& paint) const {}

SkRect Shaper::Result::computeVisualBounds() const {}

#if !defined(SK_DISABLE_LEGACY_SHAPER_FACTORY)
Shaper::Result Shaper::Shape(const SkString& text, const TextDesc& desc, const SkPoint& point,
             const sk_sp<SkFontMgr>& fontmgr) {}

Shaper::Result Shaper::Shape(const SkString& text, const TextDesc& desc, const SkRect& box,
             const sk_sp<SkFontMgr>& fontmgr) {}

#endif

} // namespace skottie