- virtual float GetDefaultFontSize() const = 0;
-
- /**
- * Gets a font line height to match a given caps-height
- *
- * @note fontFamily and fontStyle must have been validated previously.
- * @see ValidateFontFamilyName().
- *
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[in] capsHeight The caps-height in pixels
- */
- virtual PixelSize GetFontLineHeightFromCapsHeight(const std::string& fontFamily, const std::string& fontStyle, CapsHeight capsHeight) const = 0;
-
- /**
- * Called by Font objects to synchronously query glyph data.
- *
- * @note fontFamily and font style, included in the resource request, must have been validated previously.
- * @see ValidateFontFamilyName().
- *
- * @note Font's style goes inside the textRequest parameter
- * @param[in] textRequest Resource request. Includes font's style.
- * @param[in] fontFamily The name of the font's family
- * @param[in] getBitmap Whether to load bitmaps for the symbols as well
- * @return A GlyphSet pointer with a list of the requested glyph metrics.
- */
- virtual Integration::GlyphSet* GetGlyphData ( const Integration::TextResourceType& textRequest,
- const std::string& fontFamily,
- bool getBitmap) const = 0;
-
- /**
- * Called by GlyphResourceManager to synchronously load glyph data.
- *
- * @note fontFamily and font style, included in the resource request, must have been validated previously.
- * @see ValidateFontFamilyName().
- *
- * @param[in] textRequest resource request
- * @param[in] fontFamily name of the font's family
- * @return A GlyphSet pointer containing the requested glyph bitmaps.
- */
- virtual Integration::GlyphSet* GetCachedGlyphData( const TextResourceType& textRequest,
- const std::string& fontFamily ) const = 0;
-
- /**
- * Called by Font objects to synchronously query global font metrics.
- *
- * @note fontFamily and fontStyle, must have been validated previously.
- * @see ValidateFontFamilyName().
- *
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[out] globalMetrics font requested global metrics.
- */
- virtual void GetGlobalMetrics( const std::string& fontFamily,
- const std::string& fontStyle,
- Integration::GlobalMetrics& globalMetrics ) const = 0;
-
- /**
- * Sets horizontal and vertical pixels per inch value that is used by the display
- * @param[in] dpiHorizontal horizontal dpi value
- * @param[in] dpiVertical vertical dpi value
- */
- virtual void SetDpi (unsigned int dpiHorizontal, unsigned int dpiVertical) = 0;
-
- /**
- * Returns the name of the font's family for displayed text.
- * If possible, the returned font name should be able to display all characters in text.
- * Otherwise returns closest match.
- * @param[in] charsRequested displayed text
- */
- virtual const std::string& GetFontFamilyForChars(const TextArray& charsRequested) const = 0;
-
- /**
- * Checks whether all characters of text could be displayed with specified font family.
- *
- * @note fontFamily and fontStyle must have been validated previously.
- * @see ValidateFontFamilyName().
- *
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[in] text displayed text
- */
- virtual bool AllGlyphsSupported(const std::string& fontFamily, const std::string& fontStyle, const TextArray& text) const = 0;
-
- /**
- * Checks whether fontName is a valid font family name and fontStyle is a valid font style.
- * closestFontFamilyMatch and closestFontStyleMatch are always set to the best matching font
- * or the system default font if no near match is detected.
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[out] isDefaultSystemFont Whether this font has been created with a default system font.
- * @param[out] closestFontFamilyMatch Name of the font's family found based on the user input family's name
- * @param[out] closestFontStyleMatch Name of the font's style found based on the user input font's style
- * @return Whether a valid match has been found.
- */
- virtual bool ValidateFontFamilyName(const std::string& fontFamily, const std::string& fontStyle, bool& isDefaultSystemFont, std::string& closestFontFamilyMatch, std::string& closestFontStyleMatch) const = 0;
-
- /**
- * The mode for GetFontList()
- */
- enum FontListMode
- {
- LIST_SYSTEM_FONTS,
- LIST_APPLICATION_FONTS,
- LIST_ALL_FONTS
- };
-
- /**
- * Gets a list of fonts installed on the system.
- * @param[in] mode which fonts to include in the list.
- * @param[out] fontList The list of font family names.
- */
- virtual void GetFontList( FontListMode mode, std::vector<std::string>& fontList ) const = 0;