note
	description: "[
		A font contained inside a custom package file
		that can be use to draw text with a {TEXT_IMAGE}.
	]"
	author: "Louis Marchand"
	date: "Mon, 30 Mar 2015 01:06:37 +0000"
	revision: "2.0"

class interface
	TEXT_FONT_CPF

create 
	make,
	make_with_index

feature -- Initialisation

	make (a_cpf: CPF_PACKAGE_FILE; a_cpf_index: INTEGER_32; a_size: INTEGER_32)
			-- Initialization for Current contained in a_cpf at index
			-- a_cpf_index and using a_size as Currents size.
		require
			font_text_enabled: Text_library.is_text_enable
			cpf_index_valid: a_cpf.is_readable and then a_cpf_index > 0 and then a_cpf_index <= a_cpf.sub_files_count

	make_with_index (a_cpf: CPF_PACKAGE_FILE; a_cpf_index: INTEGER_32; a_size: INTEGER_32; a_index: INTEGER_32)
			-- Initialization for Current contained in a_cpf at index
			-- a_cpf_index and using a_size as Currents size.
			-- The a_index is use if there is more than one font in a ttf file.
		require
			font_text_enabled: Text_library.is_text_enable
			cpf_index_valid: a_cpf.is_readable and then a_cpf_index > 0 and then a_cpf_index <= a_cpf.sub_files_count
	
feature -- Access

	open
			-- Open Current

	disable_style_modifier
			-- Disable all style modifier (underline, bold, italic and strike through)

	is_underline: BOOLEAN
			-- Is Current has an underline style modifier

	enable_underline
			-- Add an underline style modifier to Current

	disable_underline
			-- remove an underline style modifier to Current

	is_bold: BOOLEAN
			-- Is Current has a bold style modifier

	enable_bold
			-- Add a bold style modifier to Current

	disable_bold
			-- remove a bold style modifier to Current

	is_italic: BOOLEAN
			-- Is Current has an italic style modifier

	enable_italic
			-- Add an italic style modifier to Current

	disable_italic
			-- remove an italic style modifier to Current

	is_strike_through: BOOLEAN
			-- Is Current has a strike through style modifier

	enable_strike_through
			-- Add a strike through style modifier to Current

	disable_strike_through
			-- remove a strike through style modifier to Current

	has_outline: BOOLEAN
			-- Is Current has an outline size.

	outline_size: INTEGER_32 assign set_outline_size
			-- The ouline width of Current (0 for disabled)

	set_outline_size (a_outline_size: INTEGER_32)
			-- Assign outline_size with the value of outline_size

	disable_outline
			-- Disable the outline size in Current

	has_hinting: BOOLEAN
			-- Has the library a hint about how to draw Current

	disable_hinting
			-- Disable the draw hinting of Current

	has_normal_hinting: BOOLEAN
			-- The library has the normal hinting to draw `Current

	enable_normal_hinting
			-- Use the normal hinting to draw Current

	has_light_hinting: BOOLEAN
			-- The library has the light hinting to draw Current

	enable_light_hinting
			-- Use the light hinting to draw Current

	has_monochrome_hinting: BOOLEAN
			-- The library has the monochrome hinting to draw Current.

	enable_monochrome_hinting
			-- Use the monochrome hinting to draw Current.
			-- Must only be use with monochrome display

	is_kerning_enabled: BOOLEAN
			-- If True, the library can use kerning when drawing a text with Current

	enable_kerning
			-- Allow the library to use kerning when drawing a text with Current

	disable_kerning
			-- Does not allow the library to use kerning when drawing a text with Current

	maximum_height: INTEGER_32
			-- The maximum height that a gliph can take in pixel using Current

	ascent: INTEGER_32
			-- distance from the top of the drawing area to the baseline in pixel.

	descent: INTEGER_32
			-- distance from the baseline to the bottom of the drawing area in pixel.

	line_skip_height: INTEGER_32
			-- the recommended pixel height of a rendered line of text using Current

	is_monospace: BOOLEAN
			-- True if every character that exists in Current is the same width

	face_family_name: READABLE_STRING_GENERAL
			-- The name of the face family of Curent

	face_style_name: READABLE_STRING_GENERAL
			-- The name of the face style of Curent

	is_glyph_provided (a_character: CHARACTER_32): BOOLEAN
			-- Is Current can draw a glyph representing a_character

	glyph_metrics (a_character: CHARACTER_32): TUPLE [minimal_x: INTEGER_32; maximal_x: INTEGER_32; minimal_y: INTEGER_32; maximal_y: INTEGER_32; advance: INTEGER_32]
			-- The informations about the glyph representing a_character generated with Current.
			-- Set has_error on error.

	text_dimension (a_text: READABLE_STRING_GENERAL): TUPLE [width: INTEGER_32; height: INTEGER_32]
			-- The dimension of the a_text drawed with Current
	
end -- class TEXT_FONT_CPF

Generated by ISE EiffelStudio