flutter_flutter/tests/FontTestUtils.h
Seigo Nonaka 3dd8757fcf Fix invalid decrement range of KEYCAP handling in itemize.
This issue was introduced by I22ce0e9eadc941f84e3a9b23462f194e51dd7180.
Need to decrement the two utf16 chars in KEYCAP handling.

To add unit tests, this CL also addresses the Bug: 24184208 by
introducing self built fonts since there is no good example in system
installed fonts.

Bug: 24184208
Change-Id: I23fa008adbaced78a3cb96442a6bc8892ab84ce8
2015-11-13 14:39:06 +09:00

32 lines
1.1 KiB
C++

/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINIKIN_FONT_TEST_UTILS_H
#define MINIKIN_FONT_TEST_UTILS_H
#include <minikin/FontCollection.h>
/**
* Returns FontCollection from installed fonts.
*
* This function reads /system/etc/fonts.xml and make font families and
* collections of them. MinikinFontForTest is used for FontFamily creation.
*/
std::unique_ptr<android::FontCollection> getFontCollection(
const char* fontDir, const char* fontXml);
#endif // MINIKIN_FONT_TEST_UTILS_H