Jump to content

Create font files for Bootloader GUI's

font typeface PNG Clover Chameleon GUI Design

  • Please log in to reply
121 replies to this topic

#41
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

Okay. So there's an issue with interpreting "RGBA(n,n,n,n)"

I wonder why it works here and not with you?

different ImageMagick.

 

I can say additionally that png obtained from "convert" is not understandable by Clover. We MUST optimize it by pngquant  :yes:

Then the result

Attached File  Screen Shot 2015-06-03 at 17.31.48.png   1015.6KB   1 downloads

 

Using this script I have to say that Clover interprets first pixel as transparent so doesn't matter what is background color.

Seems "grey" will be enough.

But fill color should be tunable...



#42
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

Thanks for your time and testing Slice.

Good to see you have managed to create a file and get it working in Clover.

 

I'll change the script so the optimise option is enabled by default.

But I'm not sure what's required for your version of ImageMagick to correctly draw text fill colour with user chosen RGB values. I know it works fine here.

 

I'll do some research :)



#43
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

Updated to v0.81

- Optimisation using pngquant is now enabled by default.

- Fix assigning colour to text and background by using RGB and not RGBA by default.  Use -a option to set text transparency (if your ImageMagick install can do it).



#44
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

For me instead of

        f) # FONT -  Check the arguments
            if [ ! -f "$OPTARG" ]; then
                echo "Font $1 not found"
                echo "exiting"
                exit 1
            else
                gFontToUse=$OPTARG
            fi
            ;;

write

        f) # FONT -  Check the arguments
                gFontToUse=$OPTARG
            ;;

because there is name of font, not a file. The font will be found in system.

 

Color format can be

-fill blue
-fill "#ddddff"
-fill "rgb(255,255,255)"

http://www.imagemagi...tions.php?#fill

I see no RGBA ?


Binary download from imagemagick.org doesn't know png, jpeg, etc... so users can't use it.



#45
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

Hi Slice

 

because there is name of font, not a file. The font will be found in system.

 

I prefer to point the script to a font file as I don't wish to install a font to my system every time I create a PNG file.

 

 

I see no RGBA ?

 

The first sentence from that link you posted reads:

This option accepts a color name, a hex color, or a numerical RGB, RGBA, HSL, HSLA, CMYK, or CMYKA specification. See Color Names for a description of how to properly specify the color argument.

 

 

Binary download from imagemagick.org doesn't know png, jpeg, etc... so users can't use it.

My opening post states to use Homebrew.

I've found this to be the best way to install ImageMagick and it installs all necessary delegates required for this script.

 

I've just installed on a 10.7 system and it works first time. Same for 10.6.8  ;)

$ brew install imagemagick
==> Installing dependencies for imagemagick: xz, libtool, pkg-config, jpeg, libpng, libtiff, freetype
....


#46
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

I already have macport with a plenty of libraries and I can't mix it with Homebrew.

Let other users decide how they get ImageMagick but I see no way to get binary package. I'll try to make it including vital dylibs.

 

 

 

I prefer to point the script to a font file as I don't wish to install a font to my system every time I create a PNG file.

It doesn't exclude both way.



#47
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

Hi blackosx,
let compare our ImageMagick

Sergeys-iMac:~ slice$ convert -version
Version: ImageMagick 6.9.1-4 Q16 x86_64 2015-06-03 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features:  Cipher
Delegates (built-in): bzlib cairo fontconfig freetype jp2 lzma openexr pangocairo png rsvg x xml zlib

Sergeys-iMac:~ slice$ 

I think this is full archive.

To use follow instructions here

http://www.imagemagi...ry-releases.php

Attached File  ImageMagick-6.9.1.tar.lzma.zip   6.04MB   4 downloads



#48
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

I already have macport with a plenty of libraries and I can't mix it with Homebrew.

Let other users decide how they get ImageMagick but I see no way to get binary package. I'll try to make it including vital dylibs.

 

Okay. Fair point.
 

It doesn't exclude both way.

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



#49
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

Some good results. To use rescale it and recolor.

 

Attached Files



#50
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

Hi blackosx,
let compare our ImageMagick

Sergeys-iMac:~ slice$ convert -version
Version: ImageMagick 6.9.1-4 Q16 x86_64 2015-06-03 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features:  Cipher
Delegates (built-in): bzlib cairo fontconfig freetype jp2 lzma openexr pangocairo png rsvg x xml zlib

Sergeys-iMac:~ slice$ 

I think this is full archive.

To use follow instructions here

http://www.imagemagi...ry-releases.php

attachicon.gifImageMagick-6.9.1.tar.lzma.zip

 

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

Attached File  Screen Shot 2015-06-04 at 10.57.38.png   875.65KB   5 downloads

 

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
 

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


Some good results. To use rescale it and recolor.

Great :D

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



#51
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

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?  



#52
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

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.



#53
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

There is a download for ImageMagick for Mac http://cactuslab.com/imagemagick/



#54
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK
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.imagemagi...t/resources.php

#55
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

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.



#56
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK

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.


#57
droples

droples

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 250 posts
  • Gender:Male

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
  ......

Attached File  fff.png   328.62KB   0 downloads



#58
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,767 posts
  • Gender:Male
  • Location:UK
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....


#59
droples

droples

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 250 posts
  • Gender:Male

 

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.

Attached File  New.png   98.26KB   2 downloads



#60
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,461 posts
  • Gender:Male
  • Location:Moscow

A Clover's bug with too large font.

Attached File  Screen Shot 2015-06-07 at 8.10.31.png   1MB   1 downloads







Also tagged with one or more of these keywords: font, typeface, PNG, Clover, Chameleon, GUI, Design


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy