diff --git a/headers/private/servers/app/ServerFont.h b/headers/private/servers/app/ServerFont.h index 20480a3ad2..689cd28974 100644 --- a/headers/private/servers/app/ServerFont.h +++ b/headers/private/servers/app/ServerFont.h @@ -39,6 +39,12 @@ public: uint16 flags=0, uint8 spacing=B_CHAR_SPACING); ServerFont(const ServerFont &font); ~ServerFont(void); + + // TODO: make more advanced... + status_t InitCheck() const + { return fStyle ? B_OK : B_NO_INIT; } + + font_direction Direction(void) const { return fDirection; } uint32 Encoding(void) const { return fEncoding; } edge_info Edges(void) const { return fEdges; } diff --git a/src/servers/app/ServerFont.cpp b/src/servers/app/ServerFont.cpp index 9a3115280d..5e2ba1d15a 100644 --- a/src/servers/app/ServerFont.cpp +++ b/src/servers/app/ServerFont.cpp @@ -57,6 +57,10 @@ ServerFont::ServerFont(FontStyle *style, float size, float rotation, float shear fStyle->AddDependent(); } +// TODO: fStyle should not be NULL. There should be another FontStyle +// constructor, that initializes without actually interfacing with +// freetype, so that a ServerFont can be guaranteed to be "valid". + ServerFont::ServerFont(void) { fStyle=NULL;