{"id":1395,"date":"2017-12-16T18:04:49","date_gmt":"2017-12-16T17:04:49","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1395"},"modified":"2018-01-07T19:41:54","modified_gmt":"2018-01-07T18:41:54","slug":"05-font-library-stm32f746","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1395","title":{"rendered":"05-FONT-Library (STM32F746)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1393\" title=\"04-LCD-Library (STM32F746)\"><span class=\"meta-nav\">\u2190<\/span> 04-LCD-Library (STM32F746)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1397\" title=\"06-Graphic_2D-Library (STM32F746)\">06-Graphic_2D-Library (STM32F746) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p><strong>Beschreibung :<\/strong><\/p>\n<p>Mit dieser Library k\u00f6nnen Zeichen und Text Funktionen auf dem STM32F746 Discovery-Board benutzt werden.<\/p>\n<p><strong>Module :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">stm32_ub_font.h, stm32_ub_font.c\r\n<\/pre>\n<p><strong>Includes :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">#include \"stm32_ub_system.h\"\r\n<\/pre>\n<p><strong>Strukturen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einem monospaced Font (max 16 Pixel Breite)\r\n\/\/-------------------------------------------------------------- \r\ntypedef struct UB_Font_t {\r\n  const uint16_t *table; \/\/ Tabelle mit den Daten\r\n  uint16_t width;        \/\/ Breite eines Zeichens (in Pixel)\r\n  uint16_t height;       \/\/ Hoehe eines Zeichens  (in Pixel)\r\n}UB_Font;\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einem monospaced Font (max 32 Pixel Breite)\r\n\/\/--------------------------------------------------------------\r\ntypedef struct UB_Font32_t {\r\n  const uint32_t *table; \/\/ Tabelle mit den Daten\r\n  uint16_t width;        \/\/ Breite eines Zeichens (in Pixel)\r\n  uint16_t height;       \/\/ Hoehe eines Zeichens  (in Pixel)\r\n}UB_Font32;\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einem proportional Font (max 16 Pixel Breite)\r\n\/\/--------------------------------------------------------------\r\ntypedef struct UB_pFont_t {\r\n  const uint16_t *table; \/\/ Tabelle mit den Daten\r\n  uint16_t height;       \/\/ Hoehe eines Zeichens  (in Pixel)\r\n  uint16_t first_char;   \/\/ erstes Zeichen  (Ascii-Nr)\r\n  uint16_t last_char;    \/\/ letztes Zeichen (Ascii-Nr)\r\n}UB_pFont;\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einem proportional Font (max 32 Pixel Breite)\r\n\/\/--------------------------------------------------------------\r\ntypedef struct UB_pFont32_t {\r\n  const uint32_t *table; \/\/ Tabelle mit den Daten\r\n  uint16_t height;       \/\/ Hoehe eines Zeichens  (in Pixel)\r\n  uint16_t first_char;   \/\/ erstes Zeichen  (Ascii-Nr)\r\n  uint16_t last_char;    \/\/ letztes Zeichen (Ascii-Nr)\r\n}UB_pFont32;\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Aktivierung der verschiedenen Fonts\r\n\/\/ (unbenutzte einfach auskommentieren)\r\n\/\/ fuer alle benutzten Fonts muss das entsprechende C-File\r\n\/\/ in der CooCox-IDE hinzugef\u00fcgt werden\r\n\/\/--------------------------------------------------------------\r\n\/\/ monospaced\r\nextern UB_Font Arial_7x10; \r\nextern UB_Font Arial_8x13;\r\nextern UB_Font Arial_10x15;\r\nextern UB_Font Arial_11x18;\r\nextern UB_Font Arial_13x19;\r\nextern UB_Font Arial_14x22;\r\nextern UB_Font Arial_16x25;\r\nextern UB_Font32 Arial_18x27;\r\n\/\/ proportional\r\nextern UB_pFont pArial_10;\r\nextern UB_pFont pArial_13;\r\nextern UB_pFont pArial_16;\r\nextern UB_pFont pComic_12;\r\nextern UB_pFont pComic_16;\r\nextern UB_pFont pTimes_12;\r\nextern UB_pFont pTimes_15;\r\nextern UB_pFont32 pArial_21;\r\nextern UB_pFont32 pComic_19;\r\nextern UB_pFont32 pTimes_18;\r\n<\/pre>\n<p><strong>Funktionen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void UB_Font_DrawChar(uint16_t x, uint16_t y, uint8_t ascii, UB_Font *font, uint16_t vg, uint16_t bg);\r\nvoid UB_Font_DrawString(uint16_t x, uint16_t y,char *ptr, UB_Font *font, uint16_t vg, uint16_t bg);\r\nvoid UB_Font_DrawChar32(uint16_t x, uint16_t y, uint8_t ascii, UB_Font32 *font, uint16_t vg, uint16_t bg);\r\nvoid UB_Font_DrawString32(uint16_t x, uint16_t y,char *ptr, UB_Font32 *font, uint16_t vg, uint16_t bg);\r\nuint16_t UB_Font_DrawPChar(uint16_t x, uint16_t y, uint8_t ascii, UB_pFont *font, uint16_t vg, uint16_t bg);\r\nvoid UB_Font_DrawPString(uint16_t x, uint16_t y,char *ptr, UB_pFont *font, uint16_t vg, uint16_t bg);\r\nuint16_t UB_Font_DrawPChar32(uint16_t x, uint16_t y, uint8_t ascii, UB_pFont32 *font, uint16_t vg, uint16_t bg);\r\nvoid UB_Font_DrawPString32(uint16_t x, uint16_t y,char *ptr, UB_pFont32 *font, uint16_t vg, uint16_t bg);\r\n<\/pre>\n<p><strong>Beispiel :<\/strong><br \/>\nSiehe:\u00a0<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1449\">01-F746-Demo LED, Button, LCD, Text und Grafik<\/a><\/p>\n<p>Hier die Library zum\u00a0<strong>Download :<\/strong><\/p>\n<p>05 = FONT :\u00a0<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2015\/07\/f746_font_v100.zip\">f746_font_v100<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beschreibung : Mit dieser Library k\u00f6nnen Zeichen und Text Funktionen auf dem STM32F746 Discovery-Board benutzt werden. Module : stm32_ub_font.h, stm32_ub_font.c Includes : #include &#8222;stm32_ub_system.h&#8220; Strukturen : \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; \/\/ Struktur von einem monospaced Font (max 16 Pixel Breite) \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; typedef struct &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1395\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":182,"menu_order":5,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[130],"tags":[142,9,105],"class_list":["post-1395","page","type-page","status-publish","hentry","category-stm32f746","tag-font","tag-library","tag-stm32f746"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1395"}],"version-history":[{"count":3,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1395\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1395\/revisions\/1921"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/182"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}