mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Move font API to GpCommon
This commit is contained in:
@@ -3,18 +3,16 @@
|
||||
#include <stdint.h>
|
||||
|
||||
class PLPasStr;
|
||||
struct GpRenderedFontMetrics;
|
||||
struct GpRenderedGlyphMetrics;
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
struct RenderedFontMetrics;
|
||||
|
||||
struct RenderedGlyphMetrics;
|
||||
|
||||
class RenderedFont
|
||||
{
|
||||
public:
|
||||
virtual bool GetGlyph(unsigned int character, const RenderedGlyphMetrics *&outMetricsPtr, const void *&outData) const = 0;
|
||||
virtual const RenderedFontMetrics &GetMetrics() const = 0;
|
||||
virtual bool GetGlyph(unsigned int character, const GpRenderedGlyphMetrics *&outMetricsPtr, const void *&outData) const = 0;
|
||||
virtual const GpRenderedFontMetrics &GetMetrics() const = 0;
|
||||
virtual size_t MeasureString(const uint8_t *chars, size_t len) const = 0;
|
||||
virtual bool IsAntiAliased() const = 0;
|
||||
|
||||
@@ -28,11 +26,11 @@ namespace PortabilityLayer
|
||||
#include "PLPasStr.h"
|
||||
|
||||
inline size_t PortabilityLayer::RenderedFont::MeasurePStr(const PLPasStr &pstr) const
|
||||
{
|
||||
{
|
||||
return this->MeasureString(pstr.UChars(), pstr.Length());
|
||||
}
|
||||
|
||||
inline size_t PortabilityLayer::RenderedFont::MeasureCharStr(const char *str, size_t len) const
|
||||
{
|
||||
{
|
||||
return this->MeasureString(reinterpret_cast<const uint8_t*>(str), len);
|
||||
}
|
||||
|
Reference in New Issue
Block a user