Jump to content

Create font files for Bootloader GUI's


blackosx
 Share

126 posts in this topic

Recommended Posts

Your package looks good.

The only difference I see initially, just by looking at the directory structure is in both my installs (10.10 and 10.6) I have a modules-Q16 directory under /lib/ImageMagick-6

attachicon.gifScreen Shot 2015-06-04 at 10.57.38.png

Hm. I have no such folder anywhere.

From my 10.10 - ImageMagick v6.9.0-3

 

$ convert -version
Version: ImageMagick 6.9.0-3 Q16 x86_64 2015-01-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png xml zlib
 

You have no fontconfig function? Is it influence?

I'll run more tests during the day when I get time.

 

Great :D

I found disabling anti aliasing useful when using thin fonts or they won't be readable when used in Clover.

Yes, I should make fonts without AA.

 

 
 

I look at updating the script to look for both font file and in system if file not exist.

 

Two more problems. Font name may contain spaces. What to enter? "Gill Sans"?

Some fonts are not ttf. There are ttc, odf and others. Are they works?  

Link to comment
Share on other sites

Hm. I have no such folder anywhere.

If I rename /usr/local/Cellar/imagemagick/<version>/lib/ImageMagick/modules-Q16/coders then convert no longer runs and my script fails so modules/coders are necessary with my build.

 

You have no fontconfig function? Is it influence?

It doesn't seem to be needed here, but I don't really know much about imagemagick other than what I've needed to find for this script.

 

Two more problems. Font name may contain spaces. What to enter? "Gill Sans"?

Well, passing font path with space in name works fine when escaping the space.

 

./createfont.sh -s24 -t2 -f/Users/blackosx/Library/Fonts/Bank\ Gothic

 

Some fonts are not ttf. There are ttc, odf and others. Are they works?  

I've successfully used truetype, opentype and postscript type 1 fonts. But there are thousands of fonts out there so if somebody has a font that won't work then there's sure to be something similar out there that will work.

Link to comment
Share on other sites

Hi Slice

 

I remember trying out a package from cactus labs last year without much success which is another reason why I switched to installing ImageMagick using Homebrew. But I thought I'd try again on a 10.9 install to see how I get on.

 

I’ve just tried the first package from that page which installs easily.

$ convert -versionVersion: ImageMagick 6.9.1-0 Q16 x86_64 2015-03-22 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2015 ImageMagick Studio LLCLicense: http://www.imagemagick.org/script/license.phpFeatures: DPC OpenCLDelegates (built-in): bzlib fftw jng jpeg lcms lzma png tiff webp xml zlib 
However, like it says on the webpage, the package is missing the freetype delegate library

$ ./createFont.sh -t2 -s24 -f/Volumes/Store/Work/Fonts/L/Lithos\ ƒ/LithoBla Canvas=0x32 | Char cell=0x2Building ImageMagick code sequenceRunning ImageMagick to create imageconvert: delegate library support not built-in `/Volumes/Store/Work/Fonts/L/Lithos ƒ/LithoBla' (Freetype) @ warning/annotate.c/RenderFreetype/1560.
It then goes on to say the second installer requires XQuartz which is at 68MB dmg of the X11 windowing system which I do not intend to install just to get fontconfig and freetype.

 

EDIT:

This will be a useful read

http://www.imagemagick.org/script/resources.php

Link to comment
Share on other sites

I see there is no easy way to get ImageMagick for users.

They can download my version and then report if a library missing. I will upload all dependencies.

I successfully installed the ImageMagick on other computer this way.

Link to comment
Share on other sites

Updated to v0.82

- Fixed duplicate red pixels when applying padding to type 1 fonts for Chameleon.
- the -f option now accepts the name of an installed font (providing ImageMagick has it listed in it’s type.xml file), as well as a file path.
- Added -i option to list all installed fonts that ImageMagick knows about (reads the type.xml file).
- Added some progress dots to show the script is doing something.
  • Like 1
Link to comment
Share on other sites

Up to v0.82 

Dropletss-iMac:createFont_v0.82 droplets$ convert -version
Version: ImageMagick 6.9.0-0 Q16 x86_64 2015-06-02 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml zlib

I probably have some problems with the new opportunity -f

Dropletss-iMac:createFont_v0.82 droplets$ ./createFont.sh -i
  Font: AvantGarde-Book
  Font: AvantGarde-BookOblique
 .........
  Font: Trebuchet-MS
  ......

post-617057-0-81425100-1433564708_thumb.png

Link to comment
Share on other sites

Hi Chief Tester :D
 
From what you show of your font list, I only see ‘Trebuchet-MS’
I see you are passing this
./createFont.sh -t2 -s22 -f/Trebuchet\ MS.ttf
You need to be passing the -f option the exact name as shown in the list:
./createFont.sh -t2 -s22 -fTrebuchet-MS
Can you try that?

PS

 

attachicon.gif Clover.png

:D

 

Yeah - ImageMagick is powerful and can do amazing things.
I've only scratched the surface with it....
  • Like 2
Link to comment
Share on other sites

 

Hi Chief Tester :D
 
You need to be passing the -f option the exact name as shown in the list:
./createFont.sh -t2 -s22 -fTrebuchet-MS
Can you try that?

:D

 

Yeah - ImageMagick is powerful and can do amazing things.
I've only scratched the surface with it....

 

kidding? ;).

So all is well.Thanks you.

post-617057-0-90356500-1433578356_thumb.png

  • Like 1
Link to comment
Share on other sites

Yes. Larger fonts don't wok very well which is a shame.

Can you change Clover to print more characters if the GUI resolution is wide enough to show them?

For example, the options page list. Can the text area be expandable to fit the text at font size? and the scroll bar be floated to the right?

Link to comment
Share on other sites

Yes. Larger fonts don't wok very well which is a shame.

Can you change Clover to print more characters if the GUI resolution is wide enough to show them?

For example, the options page list. Can the text area be expandable to fit the text at font size? and the scroll bar be floated to the right?

I think yes but it requires some additional work.

Link to comment
Share on other sites

Clover 3217

createFont 0.82

 

Hi, blackosx.

I have a small problem. Some extra stuff at the bottom of the Lowercase “z”.

I have try to change the font, and use the option -l, same problem.

Font should be created TextHeight + 1. Blackosx?

Link to comment
Share on other sites

@bb1045 - I'd forgotten about that one - thanks for the reminder:)

I'll fix it for the next update, which incidentally already includes extra horizontal spacing.


I think yes but it requires some additional work.

Cool. It will be a good thing to do, but there's no rush.


this is not right place to ask but could you make a script can port chameleon themes to clover ???

will be very for people looking or thinking to port chameleon themes 

A script could help, but as it would only need doing once then surely theme conversion should be done by hand. Besides, some Chameleon themes won't work with Clover due to the icons being different shapes. I can't remember seeing many users request Chameleon themes in Clover. Which ones did you have in mind? 

Link to comment
Share on other sites

@bb1045 - I'd forgotten about that one - thanks for the reminder:)

I'll fix it for the next update, which incidentally already includes extra horizontal spacing.

Ah, that's great! Looking forward to it.

Link to comment
Share on other sites

Updated to v0.83

- Fix newline after printing feedback/progress dots.
- Increase character spacing by 2 pixels for type 2 (Clover) fonts to accommodate Πchar.
- Clean up code a little bit.
- Include complete char set when determining text height for type 2 fonts.

Ah, that's great! Looking forward to it.

Please try it now.

 

EDIT: Hang on.. It's not right. I'll change it.

Link to comment
Share on other sites

Rather than having no script here I've re-attached v0.82 to the opening post for now.

I'm going to make some fundamental changes to the way type 2 fonts are created as I'm not happy with the existing script.

Link to comment
Share on other sites

Update. 

 

I now have v0.85 of the script working as I want it, but I need to clean and tidy the script before posting; Maybe later tonight.
 
Previous versions of the script worked great with some fonts, but not all. On some occasions, the glyphs would ‘bleed’ in to other cells resulting in parts of other characters appearing where they shouldn’t.
 
Here are some images showing comparisons of results v0.82 vs 0.85.
 

post-331032-0-67328200-1433947315_thumb.jpg

post-331032-0-18511800-1433947321_thumb.jpg

post-331032-0-80819800-1433947346_thumb.jpg

  • Like 1
Link to comment
Share on other sites

Updated to v0.85

 
- Reworked creating Clover (type 2) fonts to correctly separate each character in to it’s own grid cell.
 
The result means final font files are slightly larger in pixel size than files made with previous versions of the script, or even by hand. For example, here’s an image showing the WoB_PTMono_10W_NA.png font grid I made by hand back in 2012 vs a font grid of the same font made with this version of the script.
 
post-331032-0-08797400-1433973985_thumb.jpg
 
It needs to be noted that this extra spacing has a direct impact when used on Clover:
(old on the left / new on the right)
 
post-331032-0-25196800-1433973995_thumb.jpg
 
You could use the script's -l option to reduce the leading/line spacing using a negative value (the script now accepts values +/- 16), but this will (for a high proportion of fonts) only be useful on fonts without extended ASCII and cyrillic characters as those characters tend to be the ones extending to the upper and lower bounds of the cells, though some script fonts may have also have this for alpha numeric chars.
 
Please let me know of any issues.
  • Like 1
Link to comment
Share on other sites

Hi Slice

 

Yeah... I found this too.

 

You can try passing a negative value to the -l option to close the line spacing but if the font includes extended ascii or cyrillic chars then the tops/bottoms of those characters may appear in the adjacent cells.

 

EDIT: 

Here's a screenshot showing what I mean.

Baskerville 24pt. With line spacing reduced by -4 and without adjusting line spacing.

You can see one of the extended ascii chararcters is too tall and ends up in the 'z' cell.

post-331032-0-06271300-1434628359_thumb.jpg

 

Maybe I could add an option to the script to only produce ascii chars 32-126?

This way, there will not be any extended ascii chars to move in to the characters mostly used?
Link to comment
Share on other sites

 Share

×
×
  • Create New...