Jump to content
About Just Joined group Read more... ×
blackosx

Create font files for Bootloader GUI's

126 posts in this topic

Recommended Posts

 

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.

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

Share this post


Link to post
Share on other sites
Advertisement

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  :P

Share this post


Link to post
Share on other sites

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  :P

May be we need no Y_MARGIN in Clover. Let it be in font file?

  TextHeight = FontHeight + TEXT_YMARGIN * 2;
 

Or make it settable?

Share this post


Link to post
Share on other sites

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
 
post-331032-0-99483100-1434642877_thumb.jpg

Share this post


Link to post
Share on other sites

Looks good

type2_Cambria_20pt_Cell_22x25_l-2_ra.png

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

Share this post


Link to post
Share on other sites

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

about.png

Share this post


Link to post
Share on other sites

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

 

post-331032-0-01905200-1434731396_thumb.png

Share this post


Link to post
Share on other sites

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

 

attachicon.giftype2_sofachrome rg_18pt_Cell_39x24_l0.png

This is Help menu with font Candara (as set in svn)

Screen Shot 2015-06-20 at 8.38.44.png

 

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.

Share this post


Link to post
Share on other sites

 

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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);

 


 

post-331032-0-27029500-1435385849_thumb.pngpost-331032-0-35596800-1435385857_thumb.pngpost-331032-0-72705400-1435385865_thumb.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

post-331032-0-83160400-1447772705_thumb.jpg

 

Here's a font image; original and resized by 75% width

post-331032-0-34749200-1447773200_thumb.png

post-331032-0-62784700-1447773207_thumb.png

 

I will test on a smaller font also..

Share this post


Link to post
Share on other sites

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=336
26x16=416
So 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.762
So 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>

post-331032-0-34936300-1447802466_thumb.png

post-331032-0-44027000-1447803441_thumb.png

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

Announcements

  • Similar Content

    • By MaLd0n
      -OpenCore Vanilla TUTORIAL-
       
       
      -USB Port Mapping TUTORIAL-
       
        1 -Create a USB bootable
       
      Create your usb installer, use this tool and download Catalina or Big Sur from Apple servers
       
      Catalina
      installScript_allfullapp.zip
       
      Big Sur
      installScript_1016fullapp.zip
       
      Credits: crazybirdy
       
      Copy Catalina / Big Sur installer to Applications folder, open terminal and run
       
      Catalina
       
       
      Big Sur
       
       
      If you want check one step by step, check here
       
      -Opencore Vanilla Tutorial
      https://tinyurl.com/ycvcnp8h
       
      2- EFI folder USB installation
       
      -EFI OpenCore Folder Desktop 10th Intel Processors
      Paste this EFI folder in EFI partition in your USB STICK
      https://tinyurl.com/ybwr9kq3
       
      -EFI Clover Folder Desktop 10th Intel Processors
      Paste this EFI folder in EFI partition in your USB STICK
      https://tinyurl.com/y6avuxsv
       
       
      3- EFI folder SSD
       
      -EFI OpenCore Folder Desktop 10th Intel Processors
      Paste this EFI folder in EFI partition SSD 
      https://tinyurl.com/ybwr9kq3
       
      -EFI Clover Folder Desktop 10th Intel Processors
      Paste this EFI folder in EFI partition SSD
      https://tinyurl.com/y6avuxsv
       
      4- Start Fine Tune
       
      Run this app and post full dump here for full ACPI solution
       
      RunMe.app
      https://tinyurl.com/y9562hz7
       
       
      If you like a SSDT way, here we go
      SSDT-OLARILA.aml.zip
       
      5- USB Solution
      USB INTEL SERIE 400.zip
       
      Use these kexts, enable XHCI port limit patch and follow this tutorial for remap USB ports
       
       
       
      --DSDT PATCHES--
       
      -FIX ERRORS AND WARNINGS -FIX ACPI ERRORS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE ID -DMAC -REMOVE LINES, PROBLEMATIC and UNUSED -FIX K.P in REBOOT -NVRAM -REAL TIME CLOCK -SLPB -DARWIN / WINDOWS -XHCI -PLUGIN TYPE -HDEF -ARTC -IPIC -TIMR -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -UAR1 -LAN -FWHD -USBX -PMCR -PPMC -XSPI -kUSBCompanionIndex -io-device-location -IMEI -EC -PNLF -ARPT -GFX0 -NVME -ACPI-WAKE-GPE -DTGP -HDMI / HDAU  
      --SCREENSHOTS--































      -If you want to buy me a beer - Donations with PayPal
      https://tinyurl.com/r2bvzm7
       
      Big Thanks to XLR and your Badass Motherboard, Ultrafast CPU, Coolest Heatsink, Huge Graphics Card, Tonnes of RAM,
      Gigantic Hard Drive, Lightspeed Disk Burner, Professional Sound Card, Massive LCD Display.
       
       
      -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!
      Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!

      We're all here to have fun and learn from each other!
    • By y010204025
      Update: On October 24, 2020, using clover to solve the macOS11 beta10 boot problem, you can now enjoy macOS11beta10, and the compatibility of subsequent versions is not guaranteed.
      HIDPI uses a modified version. You can directly execute the hidpi script to get a better experience. If you lose the repair, it is not within the scope of my support.
      Support upgrades without destroying the integrity of the original image.
      There seems to be a problem with the shortcut keys. If you can help solve it, thank you for your contribution.
       
      Perhaps it was the first NEC (Lenovo) Lavie Z HZ550 to install hackintosh. I hope more people who like Lavie Z series can experience Hackintosh at HZ550. She is really great.
       
      I found HZ550 & HZ750 on the Chinese website, which is amazing. It weighs only 790g, 13.3 inches, and the standard 2k screen, which is too attractive to me. I am a Hackintosh enthusiast. I think HZ550 or HZ750 with MacOS is the best Unfortunately, the Lavie Z series is not listed in China, only exists in the Japanese and American markets, and in the Japanese market is the NEC brand, while the American market uses the Lenovo logo.
       
      Fortunately, I got an HZ550 from Taobao. Yes, not HZ750. In comparison, HZ750 has more touch screens and 360 ° flip. These are hard to attract me. More importantly, HZ750 is about 200g heavier than HZ550 That's why I chose HZ550. Well, because he is only 2,000 RMB.
       
      The specific introduction can refer to NEC Japan official website:http://nec-lavie.jp/products/hz13b/
       
      The HZ550 hardware list I obtained:
                                    
                       -/+:.          ningnan@ningnandeMacBook-Air
                      :++++.          OS: 64bit Mac OS X 10.15.5 19F96
                     /+++/.           Kernel: x86_64 Darwin 19.5.0
             .:-::- .+/:-``.::-       Uptime: 19m
          .:/++++++/::::/++++++/:`    Packages: 1
        .:///////////////////////:`   Shell: zsh 5.7.1
        ////////////////////////`     Resolution: 3840x2160
       -+++++++++++++++++++++++`      DE: Aqua
       /++++++++++++++++++++++/       WM: Quartz Compositor
       /sssssssssssssssssssssss.      WM Theme: Blue (Dark)
       :ssssssssssssssssssssssss-     Disk: 11G / 108G (12%)
        osssssssssssssssssssssssso/`  CPU: Intel Core i7-5500U @ 2.40GHz
        `syyyyyyyyyyyyyyyyyyyyyyyy+`  GPU: Intel Iris Graphics 6100
         `ossssssssssssssssssssss/    RAM: 4376MiB / 8192MiB
           :ooooooooooooooooooo+.    
            `:+oo+/:-..-:/+o+/-     
       
       
      Advantages: small size, light weight, 2K screen, 8G memory, 512g SSD, keyboard feels good, and wireless network card can be replaced, which is unimaginable in today's thin and light books.
      Disadvantages: The sound is small, almost the same as the mosquitoes.
       
      Ok, bragging is over!
      In order to use the wireless network, I changed the wireless network card from inter 7265 to BCM94352ZAE. Some people called it DW1560. It is uncomfortable that in China, this card and his elder brother DW1830 were hyped to a high price of 480RMB. of. Fortunately, I bought it early, and this card is also very stable under win10, and there is no high delay and outage. The hard disk should be PM951 of Samsung, not PM981, which is lucky.   Before installing Hackintosh: You need to prepare a 16G U disk, SanDisk is not a rough choice for making MacOS installation disk, I used the latest MacOS Catalina 10.15.5, got config.plist from Rehabman, and put together an EFI, the latest version of clover and kext drivers. Thanks to Rehabman and the developers of the Black Apple community. I do n’t like that OC team very much.
      Make an installation disk: If you have a computer running MacOS, you can use the command line to make it, if you do n’t have a computer running MacOS, you can try VMware, I know that the insanelymac forum allows discussion, or use ether to write the image to U disk, use the EFI I provided to boot into the installation process.   BIOS setting: Press F12 at boot to enter the BIOS settings, Tab switches to "Security-Secure boot", set to "DISable", this is what we need, and switch to "Boot -Boot devices", set the U disk as the first boot item You can directly enter the clover guide interface, please follow it for google it.
      It is worth noting that the remaining space of your EFI partition needs to be greater than 200M, otherwise, the disk format will be wrong. In addition, the format partition format is APFS, do not choose to encrypt, your data is not valuable, at least you must have this awareness of Hackintosh, the file safe is also the same, do not enable, do not use to find your mac, otherwise, change the machine, OK .   Fortunately, no additional ssdt patch is required. All the patch functions are implemented through clover. The flat Apple is turned on. This is to solve the problem of the flower screen. You can find a solution yourself.
      Experience your black apple, this will bring a better experience than MacBook Pro.  
       
    • By Nomade
      Hello All,
       
      It's been a while that I am trying to update my system to 10.15.16.
      The install seem to start, then at reboot time I only see the Normal boot and the Recovery option from the Clover boot menu.
      None of those 2 allow to complete the update.
       
      Is there any ways to force it to install and/or show the "Update" option on the Clover boot screen?
       
      PS: I'm using Z97-Gaming-3
    • By Damx
      The specs CPU: Intel® Core™ i3 Processor 8130U, 2.20 GHz (Kaby Lake Refresh) Chipset: Intel® 300 Series Graphics: Intel® UHD Graphics 620 Display: 21.5'' 1920x1200 RAM: DDR4 PC2400 4GB SSD1: M.2 PLEXTOR (with original Windows 10) SSD2: SATA SAMSUNG 850 EVO (for macOS) Sound: Realtek ALC269 WiFi / BT: Intel 3168 NGW Realtek Card-reader  
       
      Not working
      WiFi: Intel 3168 NGW Realtek Card-reader  
       
      Pre-Installation
       
      I will not go through the basics since it is explained in details here on this site. Briefly, the process is to:
      Get Clover Get Catalina macOS installer Create USB with 2 MBR partitions (FAT32 for Clover and HFS+J for the installer)  
       
      Required kexts
      AppleALC.kext Lilu.kext RealtekRTL8111.kext VirtualSMC.kext WhateverGreen.kext  
       
      Config.plist
      I used the one provided by RehabMan called config_HD615_620_630_640_650.plist. Download it from GitHub. It has almost everything you will need with only few edits for audio.
      Edits:
      [CPU] Make sure there is lilcpu=9 setting in boot arguments needed for Kaby Lake R CPU to be recognised correctly. [GPU] Make sure there is a patch GFX0 to IGPU under ACPI->DSDT [GPU] Under Devices->Properties->PciRoot(0)/Pci(0x02,0) make sure that the AAPL,ig-platform-id value is 00001B59, and the device-id value is 16590000 [AUDIO] Under Devices->Properties->PciRoot(0)/Pci(0x1f,3) set the layout-id to 40 and the device-id to 70A10000 [SMBIOS] Set Mac model ID is iMac19,2  

       

       
      Notes
      For some reason with latest version of Clover the install partition was not visible. If you run into the same issue you can downgrade Clover to r5103, which worked perfectly. WiFi / BT Intel 3168 NGW needs to be replaced if one needs WiFi. Someone mentioned that to get HDMI work properly you may need to change AAPL,ig-platform-id value to 00001659 for PciRoot(0)/Pci(0x02,0) - not my case but may be considered if you get this issue. Don't forget to generate your serial and other SMBUS values before signing in with iCloud services.  
       
    • By MaLd0n
      A very custom DSDT for best experience under macOS. Removed all unused devices, injected all Apple devices, essentials, cosmetics, real improvements. 
       
      -OpenCore Vanilla TUTORIAL-
       
       
      -USB Port Mapping TUTORIAL-
       
          -Original DSDT have 167,880 lines and 762kb
       
      DSDT ORIGINAL.aml.zip138.01 kB · 8 downloads
       
      -Patched DSDT have 30,912 lines and 111kb
       
      DSDT PATCHED.aml.zip27.01 kB · 17 downloads
       
      --Hardware--
      Asus ROG RAMPAGE VI EXTREME OMEGA

      Processor  Intel i9-10980XE

      GPU Radeon RX 5700 XT

      --DSDT Patches--
      -FIX ERRORS AND WARNINGS -FIX ACPI ERRORS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE ID -DMAC -REMOVE LINES, PROBLEMATIC and UNUSED -REAL TIME CLOCK -SLPB -DARWIN / WINDOWS -XHCI -PLUGIN TYPE -HDEF -ARTC -IPIC -TIMR -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -UAR1 -LAN -FWHD -USBX -XSPI -EC -PNLF -ARPT -GFX0 -NVME  
      --Screenshots-



















       
      -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!
      Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!

      We're all here to have fun and learn from each other!
×