View previous topic :: View next topic |
Author |
Message |
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
Posted: Thu Nov 06, 2014 11:37 pm Post subject: Proportional Fonts for GLCDs + TrueType Converter |
|
|
Hi,
I started this project some weeks ago, when EDC posted his Font Converter one week later I was like (can happen, he did a great work ), but anyways, here it is:
Features:
Font Converter
- Exports installed TrueType fonts
- Set size, character spacing, text styles, reduced charsets
- Automatically uses RLE-compression if beneficial
- Automatic updates, Stand-alone application
Font Library
- Loads font data
- Draws strings with selected font (colored)
- Width of text with selected font
More informations & download: http://mat.midlight.eu/wiki/index.php/Bascom_Proportional_Fonts
Best regards _________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Nov 07, 2014 12:09 am Post subject: |
|
|
wow, how cool ! looks great. Thanks for sharing. _________________ Mark |
|
Back to top |
|
|
djalltra
Joined: 23 Oct 2014 Posts: 28
|
Posted: Sat Nov 08, 2014 10:53 am Post subject: |
|
|
hi there seems to be a problem with the download link |
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sat Nov 08, 2014 2:58 pm Post subject: It is working... |
|
|
Works for me.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
Posted: Mon Apr 20, 2015 8:59 pm Post subject: |
|
|
Update 1.1
FontConverter:
- Export corresponding Bascom Library
- Save font in binary file
Library:
- Lcd_tt_loadfont(): removed bylabel call, use Restore [Fontlabel] before calling Lcd_tt_loadfont()
- Proper handling of RAMPZ register for devices with more than 64K flash memory
- ~30% speed increase
br _________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Apr 20, 2015 10:32 pm Post subject: |
|
|
Thanks for the update. The TT fonts look great. _________________ Mark |
|
Back to top |
|
|
cucuruzel
Joined: 18 Mar 2010 Posts: 53 Location: Cluj-Napoca
|
Posted: Mon Feb 06, 2017 4:43 pm Post subject: |
|
|
Hello
I have tested your code, great work! Thanks
It seems there are two bugs:
1. the Lcd_tt_textwidth function returns strange results, if local X is not initialized.
I have fixed with:
Code: | Local X As Word
X = 0
|
From bascom help:
Quote: | Notice that a LOCAL variable is not initialized. It will contain a value that will depend on the value of the FRAME data. So you can not assume the variable is 0. If you like it to be 0, you need to assign it.
|
2. FontConverter.exe does not restore correctly after minimize.
Steps to reproduce:
1. Open FontConverter.exe
2. Minimize window
3. restore window from Task Bar
It would be really nice if there was some sort of font editor to tweak some chars after resize.
Windows 10 x64
Bascom version: 2.0.7.9 |
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
Posted: Sun Feb 12, 2017 4:42 pm Post subject: |
|
|
Hello,
thank you for the feedback, fixed the bugs and will deploy it with the next version.
I like the idea of being able to edit the font, I'll see what I can come up with!
Best regards _________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
Posted: Mon Feb 27, 2017 6:58 pm Post subject: |
|
|
Update 1.2
FontConverter:
- Added a character editor to modify the generated pixel font
- Added .inc font import
- Added pixel conversion threshold for font generation
- Fixed wrong arranged GUI elements when minizing
- Proper handling of underlined fonts
- Removed "Set charset" button
- minor bug fixes
Library:
- updated for Bascom 2.0.8.0
- Lcd_tt_text(): fixed R0 could contain wrong values when the font uses RLE compression, leading to corrupted text after the first character
- Lcd_tt_textwidth(): proper local variable initialisation
br _________________ LCD Menu | Proportional Fonts |
|
Back to top |
|
|
mototest2
Joined: 24 Dec 2006 Posts: 53
|
Posted: Sat Sep 16, 2017 8:01 pm Post subject: |
|
|
Hello
I have problem with tt_fonts , ProportionalFont.inc library 1.2
I use xmega128 and fonts Timesnewroman_10pt and demo ILI9341-Sample.bas
when I use Code: | Lcd_tt_text "0" , 1 , 10 , Color | then display show 03 ,
when Code: | Lcd_tt_text "1" , 1 , 10 , Color | thendisplay shows 13
when Code: | Lcd_tt_text "Hello" , 1 , 10 , Color | thendisplay shows H33333, always shows only first letter and number
where is problem ?
I noticed that result on display depend of $framesize , but always is incorrect
Thanks
Bob |
|
Back to top |
|
|
Netzman
Joined: 25 Nov 2005 Posts: 127 Location: Graz
|
Posted: Mon Nov 06, 2017 11:36 pm Post subject: |
|
|
Hello,
finally found the culprit, again it was RAMPZ getting corrupted (only happened to me when I was not using XRAM).
I updated the wiki download, existing versions should get an update notification.
Update 1.3
Library:
- fixed RAMPZ getting corrupted when not using XRAM, printing only the first character.
br _________________ LCD Menu | Proportional Fonts
Last edited by Netzman on Tue Nov 14, 2017 7:51 pm; edited 1 time in total |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Mon Nov 13, 2017 6:39 pm Post subject: |
|
|
I was try your library for the first time.
Download on the your Wiki side for 1.3version not work for me .
..but 1.2version was updated only for libary, maybe this is the catch
I dont receive any update info after download and run 1.2 (this is only info data)
Im very impressed your work and want to confirm one thing for the Other Users: "If you have routine in your programm that can Set the pixel then you can use those libs/programm"
My one change it was use my routine for this particullar TFT. You must find It in the INC file but maybe PUSH`s and POP`s may must be tested |
|
Back to top |
|
|
|