Slice Posted June 18, 2015 Share Posted June 18, 2015 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. baskerville-24pt.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? Exclude extended but save cyrillic? I also can't find why About menu is narrow. There is a bug with menu width. Link to comment Share on other sites More sharing options...
blackosx Posted June 18, 2015 Author Share Posted June 18, 2015 Exclude extended but save cyrillic? I also can't find why About menu is narrow. There is a bug with menu width. Okay. I'll revise the script later and post an update. hmm.. okay.. I will try to have a look when I get some time. But if you can't find the bug then I don't have much chance Link to comment Share on other sites More sharing options...
Slice Posted June 18, 2015 Share Posted June 18, 2015 Okay. I'll revise the script later and post an update. hmm.. okay.. I will try to have a look when I get some time. But if you can't find the bug then I don't have much chance May be we need no Y_MARGIN in Clover. Let it be in font file? TextHeight = FontHeight + TEXT_YMARGIN * 2; Or make it settable? Link to comment Share on other sites More sharing options...
blackosx Posted June 18, 2015 Author Share Posted June 18, 2015 I would say let the font file determine the line spacing. But an adjustment value would always be useful... Link to comment Share on other sites More sharing options...
blackosx Posted June 18, 2015 Author Share Posted June 18, 2015 Updated to v0.86 - Added -r option to reduce character set for type 2 fonts. -ra will not include ANSI characters -rc will not include Cyrillic characters -rac will not include either Link to comment Share on other sites More sharing options...
Slice Posted June 19, 2015 Share Posted June 19, 2015 Looks good slice$ ./createFont.sh -t2 -s20 -l -2 -fCambria -b150,150,150 -c 20,20,20 -ra Scanning font character metrics =============================== ................................................................................................................................................................................................................................................................ Widest Char is at index 87 | W at 20 pixels Canvas size will be 352x400 using cell size 22x25 Building ImageMagick code sequence Running ImageMagick to create image Optimising /Users/slice/Downloads/createFont_v0.86/type2_Cambria_20pt_Cell_22x25_l-2_ra.png Opening /Users/slice/Downloads/createFont_v0.86/type2_Cambria_20pt_Cell_22x25_l-2_ra.png Link to comment Share on other sites More sharing options...
blackosx Posted June 19, 2015 Author Share Posted June 19, 2015 Nice How does it look in Clover? Link to comment Share on other sites More sharing options...
Slice Posted June 19, 2015 Share Posted June 19, 2015 By QEMU I resolved the issue with menu width in revision 3237. Link to comment Share on other sites More sharing options...
blackosx Posted June 19, 2015 Author Share Posted June 19, 2015 Good news! Well done Slice. I see your image shows the text and icon left justified. Can it be centred like before? Link to comment Share on other sites More sharing options...
Slice Posted June 19, 2015 Share Posted June 19, 2015 Good news! Well done Slice. I see your image shows the text and icon left justified. Can it be centred like before? Before it also was left adjusted. Just I made it wider 640pt -> 800pt to be used with wide fonts Link to comment Share on other sites More sharing options...
blackosx Posted June 19, 2015 Author Share Posted June 19, 2015 OK. Great. Will this apply to the options menu, and help page too? Does Clover have to show a fixed dimension of 800px or can it be dynamic based on the width of the screen resolution with 800px as a minimum? This could be useful for fonts with wide characters which have not been usable so far. http://il.static.1001fonts.net/s/o/sofachrome-font-4-original.jpeg Link to comment Share on other sites More sharing options...
Slice Posted June 20, 2015 Share Posted June 20, 2015 OK. Great. Will this apply to the options menu, and help page too? Does Clover have to show a fixed dimension of 800px or can it be dynamic based on the width of the screen resolution with 800px as a minimum? This could be useful for fonts with wide characters which have not been usable so far. http://il.static.1001fonts.net/s/o/sofachrome-font-4-original.jpeg type2_sofachrome rg_18pt_Cell_39x24_l0.png This is Help menu with font Candara (as set in svn) I can't precalculate menu width if the font is proportional so why I made fixed width menu 800px. If some text will not fit in this width it will be truncated before output. You may use characters of any width just not sure if all text will be visible. Link to comment Share on other sites More sharing options...
blackosx Posted June 20, 2015 Author Share Posted June 20, 2015 I can't precalculate menu width if the font is proportional so why I made fixed width menu 800px. No. But menu width could be a percentage of screen resolution width with 800px as a minimum? Link to comment Share on other sites More sharing options...
Slice Posted June 22, 2015 Share Posted June 22, 2015 No. But menu width could be a percentage of screen resolution width with 800px as a minimum? Good idea. How do you think is there any computer controlled by Clover with screen width Link to comment Share on other sites More sharing options...
blackosx Posted June 25, 2015 Author Share Posted June 25, 2015 I was thinking maybe 800px minimum for maybe Qemu? Didn't I see a post here from droplets showing 800px width in bootlog? Link to comment Share on other sites More sharing options...
Slice Posted June 25, 2015 Share Posted June 25, 2015 He also can set more. 1024x768 is VESA standard working even without any drivers if monitor supported it. One can use EGA monitor from 80ys. Same about QEMU. Link to comment Share on other sites More sharing options...
blackosx Posted June 27, 2015 Author Share Posted June 27, 2015 Hi Slice I have looked in to a good way to adjust Clover’s menu width to try to accommodate wider fonts and it’s actually quite difficult. I’ve played with LAYOUT_TEXT_WIDTH while also trying to take in to account placement of animations but it’s tricky. So the best solution I have come up with is to simply draw the text with a wider width and not change the placement of the menu. /rEFIt_UEFI/refit/menu.c - line #1883 - //TextBuffer = egCreateImage(LAYOUT_TEXT_WIDTH, TextHeight, TRUE); + TextBuffer = egCreateImage(UGAWidth-XPos, TextHeight, TRUE); EDIT: Posted this to Clover bug thread: http://www.insanelymac.com/forum/topic/306156-clover-bugissue-report-and-patch/?p=2149014 Link to comment Share on other sites More sharing options...
Philip Petev Posted November 10, 2015 Share Posted November 10, 2015 Guys, how about making fonts for 4:3 VESA resolutions, stretched on 16:9 displays? Any tip how to make a font for such case? Link to comment Share on other sites More sharing options...
blackosx Posted November 10, 2015 Author Share Posted November 10, 2015 Interesting idea philip_petev. I'm sure it could be done, just need to find the right instruction for ImageMagick. I'll take a look when i get some time, or if you find one in the mean time then please share. Link to comment Share on other sites More sharing options...
Philip Petev Posted November 10, 2015 Share Posted November 10, 2015 Here's what I use to squash the theme icons with imagemagick for such cases: wsize=`identify -format "%w" "$1"` hsize=`identify -format "%h" "$1"` convert "$1" -resize 75%x100 -background transparent -gravity center -extent "$wsize"x"$hsize" "$1" The line squashes the image first. Look at the resize option value, it resizes only the image width by 75% (actually 74.9%, that's vesa width / display width * 100, for my display - 1024 VESA on 1366 display) and the height remains at 100 (%), then moves the result in the center of the canvas and then extends the image canvas to its original size (the wsize and hsize variables). Works pretty good for the icons, but won't work directly for the font images. Maybe if your script can squash the font symbols, using the same technique... 1 Link to comment Share on other sites More sharing options...
blackosx Posted November 17, 2015 Author Share Posted November 17, 2015 Thanks for taking time to look for a solution philip_petev. Yes. I see what you mean that -resize does not work with text. I've also looked for other solutions but nothing seems to work when drawing text with the primitive draw command. You may be out of luck with this, at least with this current script. Link to comment Share on other sites More sharing options...
Slice Posted November 17, 2015 Share Posted November 17, 2015 Can ImageMagic resize final image? Link to comment Share on other sites More sharing options...
blackosx Posted November 17, 2015 Author Share Posted November 17, 2015 Yes it can. However, the result will not be as sharp as when generating the text from fresh. EDIT: Just tested and it's not too bad. Here's a font image; original and resized by 75% width I will test on a smaller font also.. Link to comment Share on other sites More sharing options...
Philip Petev Posted November 17, 2015 Share Posted November 17, 2015 How exactly did you get this result? I've tried to squash directly a font by 75% and the result was unusable. Link to comment Share on other sites More sharing options...
blackosx Posted November 17, 2015 Author Share Posted November 17, 2015 Create normal font image: $ ./createFont.sh -t2 -b 12,46,128 -f /Users/blackosx/Library/Fonts/Bedizen.ttf -s18 Results in generated file: type2_Bedizen_18pt_Cell_21x26_l0.png Character grid is made using 16x16 chars:21x16=33626x16=416So final image size is 336 x 416px If we resize to 75% width: $ convert type2_Bedizen_18pt_Cell_21x26_l0.png -resize 75%x100 type2_Bedizen_18pt_Cell_21x26_l0_resized.png It won't work as final image is only 252px wide.The character grid is made using 16x16 chars so width has to be multiple of 16. Nearest multiple of 16 to 252px is 256px, so 256/336 = 0.762So we can use: $ convert type2_Bedizen_18pt_Cell_21x26_l0.png -resize 76.2%x100 type2_Bedizen_18pt_Cell_21x26_l0_resized.png Results in image sized 256x416 px. Now add to theme and set the following in theme.plist <key>Font</key> <dict> <key>CharWidth</key> <integer>16</integer> <key>Path</key> <string>type2_Bedizen_18pt_Cell_21x26_l0_resized.png</string> <key>Type</key> <string>Load</string> </dict> Link to comment Share on other sites More sharing options...
Recommended Posts