Flutter Engine
Loading...
Searching...
No Matches
font_asset_provider.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include <algorithm>
6
#include <string>
7
8
#include "
txt/font_asset_provider.h
"
9
10
namespace
txt
{
11
12
// Return a canonicalized version of a family name that is suitable for
13
// matching.
14
std::string
FontAssetProvider::CanonicalFamilyName
(std::string family_name) {
15
std::string result(family_name.length(), 0);
16
17
// Convert ASCII characters to lower case.
18
std::transform(family_name.begin(), family_name.end(), result.begin(),
19
[](
char
c) { return (c & 0x80) ? c : ::tolower(c); });
20
21
return
result;
22
}
23
24
}
// namespace txt
txt::FontAssetProvider::CanonicalFamilyName
static std::string CanonicalFamilyName(std::string family_name)
Definition
font_asset_provider.cc:14
font_asset_provider.h
txt
Definition
paragraph_builder_skia.cc:15
txt
src
txt
font_asset_provider.cc
Generated on Thu Nov 6 2025 16:11:30 for Flutter Engine by
1.9.8