Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
35
third-party/vendor/ttf-parser-0.15.2/testing-tools/font-view/ttfparserfont.h
vendored
Normal file
35
third-party/vendor/ttf-parser-0.15.2/testing-tools/font-view/ttfparserfont.h
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QPainterPath>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#define TTFP_VARIABLE_FONTS
|
||||
#include <ttfparser.h>
|
||||
|
||||
#include "glyph.h"
|
||||
|
||||
class TtfParserFont
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(TtfParserFont)
|
||||
|
||||
public:
|
||||
TtfParserFont();
|
||||
|
||||
void open(const QString &path, const quint32 index = 0);
|
||||
bool isOpen() const;
|
||||
|
||||
FontInfo fontInfo() const;
|
||||
Glyph outline(const quint16 gid) const;
|
||||
|
||||
QVector<VariationInfo> loadVariations();
|
||||
void setVariations(const QVector<Variation> &variations);
|
||||
|
||||
private:
|
||||
struct FreeCPtr
|
||||
{ void operator()(void* x) { free(x); } };
|
||||
|
||||
QByteArray m_fontData;
|
||||
std::unique_ptr<ttfp_face, FreeCPtr> m_face;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue