Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
allegro
This document pertains to font related methods found in the Allegro egg.
Please see the main [allegro] wiki page for more information.
TOC »
Enums
font-align
- font-align->int font-alignprocedure
font-align may be one of the following symbols:
- left
- center
- right
- int->font-align integerprocedure
Records
font
- fontrecord
- font-data fontprocedure
- font-height fontprocedure
utf-string
- utf-stringrecord
Functions
Fonts
- (register-font-loader (string extension) (function font (string integer integer)))procedure
Implements al_register_font_loader.
- load-bitmap-font* stringprocedure
Implements al_load_bitmap_font.
- load-bitmap-font stringprocedure
Implements al_load_bitmap_font, with (free-font!) declared as a finalizer.
- (load-font* string (integer size) (integer flags))procedure
Implements al_load_font.
- (load-font string (integer size) (integer flags))procedure
Implements al_load_font, with (free-font!) declared as a finalizer.
- (make-font-from-bitmap* bitmap (integer n) (s32vector ranges))procedure
Implements al_grab_font_from_bitmap.
- (make-font-from-bitmap bitmap (integer n) (s32vector ranges))procedure
Implements al_grab_font_from_bitmap, with (free-font!) declared as a finalizer.
- free-font! fontprocedure
Implements al_destroy_font.
- (font-draw-utf (font f) (color c) (float x) (float y) (font-align flags) (utf-string ustr))procedure
Implements al_draw_ustr.
- (font-draw-string (font f) (color c) (float x) (float y) (font-align flags) (string text))procedure
Implements al_draw_text.
- (font-draw-justified-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (c-string text))procedure
Implements al_draw_justified_text.
- (font-draw-justified-utf-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (utf-string text))procedure
Implements al_draw_justified_ustr.
- font-width font stringprocedure
Implements al_get_text_width.
- font-utf-width font utf-stringprocedure
Implements al_get_ustr_width.
- font-line-height fontprocedure
Implements al_get_font_line_height.
- font-ascent fontprocedure
Implements al_get_font_ascent.
- font-descent fontprocedure
Implements al_get_font_descent.
- (font-utf-dimensions (font f) (utf-string text))procedure
Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
- (font-dimensions (font f) (string text))procedure
Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
- font-addon-installprocedure
Implements al_init_font_addon.
- font-addon-uninstallprocedure
Implements al_shutdown_font_addon.
- font-addon-versionprocedure
Implements al_get_allegro_font_version.
True Type Font Support
- (load-ttf* (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font.
- (load-ttf (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font, with (free-font!) declared as a finalizer.
- (load-ttf-from-file* (file f) (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font_f.
- (load-ttf-from-file (file f) (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font_f, with (free-font!) declared as a finalizer.
- ttf-addon-installprocedure
Implements al_init_ttf_addon.
- ttf-addon-uninstallprocedure
Implements al_shutdown_ttf_addon.
- ttf-addon-versionprocedure
Implements al_get_allegro_ttf_version.
UTF Strings
- make-utf-string* stringprocedure
Implements al_ustr_new.
- make-utf-string stringprocedure
Implements al_ustr_new, with (free-utf-string!) declared as a finalizer.
- make-utf-string-from-buffer* blobprocedure
Given a blob, produces a new utf-string.
- make-utf-string-from-buffer blobprocedure
Given a blob, produces a new utf-string, with (free-utf-string!) declared as a finalizer.
- free-utf-string! utf-stringprocedure
Implements al_ustr_free.
- utf->string utf-stringprocedure
Implements al_cstr.
- utf->buffer! utf-string blobprocedure
Implements al_ustr_to_buffer.
- utf->string-copy utf-stringprocedure
Implements al_cstr_dup.
- utf-copy* utf-stringprocedure
Implements al_ustr_dup.
- utf-copy utf-stringprocedure
Implements al_ustr_dup, with (free-utf-string!) declared as a finalizer.
- (utf-substring* utf-string (integer start) (integer end))procedure
Implements al_ustr_dup_substr.
- (utf-substring utf-string (integer start) (integer end))procedure
Implements al_ustr_dup_substr, with (free-utf-string!) declared as a finalizer.
- utf-empty-stringprocedure
Implements al_ustr_empty_string.
- make-utf-null-string*procedure
Makes an empty utf-string struct, where the string pointer is unset.
- make-utf-null-stringprocedure
Makes an empty utf-string struct, where the string pointer is unset, with (free-utf-string!) declared as a finalizer.
- utf-reference-cstr* stringprocedure
Implements al_ref_cstr.
- utf-reference-cstr stringprocedure
Implements al_ref_cstr, with (free-utf-string!) declared as a finalizer.
- utf-reference-buffer* blobprocedure
Implements al_ref_buffer.
- utf-reference-buffer blobprocedure
Implements al_ref_buffer, with (free-utf-string!) declared as a finalizer.
- (utf-reference-utf-string* utf-string (integer start) (integer end))procedure
Implements al_ref_ustr.
- (utf-reference-utf-string utf-string (integer start) (integer end))procedure
Implements al_ref_ustr, with (free-utf-string!) declared as a finalizer.
- utf-size utf-stringprocedure
Implements al_ustr_size.
- utf-length utf-stringprocedure
Implements al_ustr_length.
- utf-offset utf-string integerprocedure
Implements al_ustr_offset.
- utf-next utf-string integerprocedure
Implements al_ustr_next, modified to return #f at the end of the string.
- utf-previous utf-string integerprocedure
Implements al_ustr_prev, modified to return #f at the end of the string.
- utf-get utf-string integerprocedure
Implements al_ustr_get.
- utf-get-next utf-string integerprocedure
Returns a 2-element list consisting of the next code and its position, or #f if at the end of the string.
- utf-get-prev utf-string integerprocedure
Returns a 2-element list consisting of the previous code and its position, or #f if at the start of the string.
- utf-remove-char! utf-string integerprocedure
Implements al_ustr_remove_chr.
- (utf-remove-range! utf-string (integer start) (integer end))procedure
Implements al_ustr_remove_range.
- utf-truncate! utf-string integerprocedure
Implements al_ustr_truncate.
- utf-ltrim! utf-stringprocedure
Implements al_ustr_ltrim_ws.
- utf-rtrim! utf-stringprocedure
Implements al_ustr_rtrim_ws.
- utf-trim! utf-stringprocedure
Implements al_ustr_trim_ws.
- utf-assign! utf-string utf-stringprocedure
Implements al_ustr_assign.
- (utf-assign-substring! utf-string utf-string (integer start) (integer end))procedure
Implements al_ustr_assign_substr.
- utf-assign-string! utf-string stringprocedure
Implements al_ustr_assign_cstr.
- (utf-set-char! utf-string (integer pos) (integer char))procedure
Implements al_ustr_set_chr.
- (utf-replace-range! utf-string (integer start) (integer end) utf-string)procedure
Implements al_ustr_replace_range.
- (utf-find utf-string (integer start) utf-string)procedure
Implements al_ustr_find_str.
- (utf-find-string utf-string (integer start) string)procedure
Implements al_ustr_find_cstr.
- (utf-find-char utf-string (integer start) (integer char))procedure
Implements al_ustr_find_chr.
- (utf-find-set utf-string (integer start) utf-string)procedure
Implements al_ustr_find_set.
- utf-find-set-string utf-string integer stringprocedure
Implements al_ustr_find_set_cstr.
- utf-find-cset utf-string integer utf-stringprocedure
Implements al_ustr_find_cset.
- utf-find-cset-string utf-string integer stringprocedure
Implements al_ustr_find_set_cstr.
- utf-rfind utf-string integer utf-stringprocedure
Implements al_ustr_rfind_str.
- (utf-rfind-char utf-string integer (integer char))procedure
Implements al_ustr_rfind_char.
- utf-rfind-string utf-string integer stringprocedure
Implements al_ustr_rfind_cstr.
- utf-find&replace! utf-string integer utf-string utf-stringprocedure
Implements al_ustr_find_replace.
- utf-find&replace-string! utf-string integer string stringprocedure
Implements al_ustr_find_replace_cstr.
- utf-equal? utf-string utf-stringprocedure
Implements al_ustr_equal.
- utf-compare utf-string utf-stringprocedure
Implements al_ustr_compare.
- utf-ncompare utf-string utf-string integerprocedure
Implements al_ustr_ncompare.
- utf-prefix? utf-string utf-stringprocedure
Implements al_ustr_has_prefix.
- utf-prefix-string? utf-string stringprocedure
Implements al_ustr_has_prefix_cstr.
- utf-suffix? utf-string utf-stringprocedure
Implements al_ustr_has_prefix.
- utf-suffix-string? utf-string stringprocedure
Implements al_ustr_has_suffix_cstr.
- utf8-width integer32procedure
Implements al_utf8_width.
- utf8-encode! blob integer32procedure
Implements al_utf8_encode.
- utf-string-utf16-size utf-stringprocedure
Implements al_ustr_size_utf16.
- utf-string-utf16-encode utf-string blob integerprocedure
Implements al_ustr_encode_utf16.
- utf16-width integerprocedure
Implements al_utf16_width.
- utf16-encode u16vector integer32procedure
Implements al_utf16_encode.