cecekpawon Posted August 29, 2016 Share Posted August 29, 2016 As expected. You can use one of following (assumed lang=ko & theme=bootcamp): 1. Drop "FontKorean.png" to "EFI\CLOVER\font\FontKorean.png" or "EFI\CLOVER\themes\bootcamp\".2. Manually edit / specify fontname in "EFI\CLOVER\theme\bootcamp\theme.plist" (Font->Path). From your log: 1. GetListOfThemes: Bad Theme list. 0:102 0:000 === [ GetListOfThemes ] =================================== 0:103 0:001 - [00]: bootcamp 0:104 0:000 - [01]: embedded 0:105 0:001 - [01]: random 2. 1st attempt: Lang=ko. Failed to load "FontKorean.png" from "EFI\CLOVER\font\" or "EFI\CLOVER\themes\<theme>\". Fallback to lang=english. 0:968 0:059 === [ InitScreen ] ======================================== ... 1:102 0:002 Loading font from ThemeDir: Error 1:105 0:002 font image not loaded, use english 1:107 0:002 load font image type 1 1:110 0:002 Using embedded font 1:113 0:003 Font loaded: ImageWidth=176 ImageHeight=288 1:116 0:002 Font 1 prepared WxH=11x18 CharWidth=9 3. 2nd attempt: Undefined fontname from bootcamp theme.plist. Failed to load default font (EFI\CLOVER\font\font.png). Fallback to font=embedded. 2:517 0:181 Using theme 'bootcamp' (EFI\CLOVER\themes\bootcamp) 2:523 0:005 Warning! Character width 9 should be even! 2:527 0:003 load font image type 2 2:532 0:005 Loading font from ThemeDir: Error 2:535 0:003 Font EFI\CLOVER\font\font.png is not loaded, using embedded 2:540 0:004 Font loaded: ImageWidth=176 ImageHeight=288 2:545 0:005 Font 2 prepared WxH=11x18 CharWidth=9 2:549 0:003 Choosing theme bootcamp 2:553 0:003 after NVRAM boot-args=dart=0 kext-dev-mode=1 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted August 29, 2016 Share Posted August 29, 2016 As expected. You can use one of following (assumed lang=ko & theme=bootcamp): 1. Drop "FontKorean.png" to "EFI\CLOVER\font\FontKorean.png" or "EFI\CLOVER\themes\bootcamp\". 2. Manually edit / specify fontname in "EFI\CLOVER\theme\bootcamp\theme.plist" (Font->Path). From your log: 1. GetListOfThemes: Bad Theme list. 0:102 0:000 === [ GetListOfThemes ] ===================================0:103 0:001 - [00]: bootcamp0:104 0:000 - [01]: embedded0:105 0:001 - [01]: random2. 1st attempt: Lang=ko. Failed to load "FontKorean.png" from "EFI\CLOVER\font\" or "EFI\CLOVER\themes\<theme>\". Fallback to lang=english.0:968 0:059 === [ InitScreen ] ========================================...1:102 0:002 Loading font from ThemeDir: Error1:105 0:002 font image not loaded, use english1:107 0:002 load font image type 11:110 0:002 Using embedded font1:113 0:003 Font loaded: ImageWidth=176 ImageHeight=2881:116 0:002 Font 1 prepared WxH=11x18 CharWidth=93. 2nd attempt: Undefined fontname from bootcamp theme.plist. Failed to load default font (EFI\CLOVER\font\font.png). Fallback to font=embedded.2:517 0:181 Using theme 'bootcamp' (EFI\CLOVER\themes\bootcamp)2:523 0:005 Warning! Character width 9 should be even!2:527 0:003 load font image type 22:532 0:005 Loading font from ThemeDir: Error2:535 0:003 Font EFI\CLOVER\font\font.png is not loaded, using embedded2:540 0:004 Font loaded: ImageWidth=176 ImageHeight=2882:545 0:005 Font 2 prepared WxH=11x18 CharWidth=92:549 0:003 Choosing theme bootcamp2:553 0:003 after NVRAM boot-args=dart=0 kext-dev-mode=1 You are right. But GUI lang is not good. Example R in F1 menu R is shown 다 ㅊㅜ 키 - 리세. It's wrongly shown. So its fix word" 단축키 - 리셋". As result, font height size is small. And something is wrong to show word correctly. If more correct show word, i can help if you teach me to fix Thanks 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
cecekpawon Posted August 29, 2016 Share Posted August 29, 2016 Far as I can remember, Slice already ask you to modify/contribute to make correction for GUI korean lang, so please.. Link to comment Share on other sites More sharing options...
Sherlocks Posted August 29, 2016 Share Posted August 29, 2016 Far as I can remember, Slice already ask you to modify/contribute to make correction for GUI korean lang, so please.. Yes. But i dont know where i touch... Theme.plist edit? Or how can i generate kor font file? I can research font correctly if you give me hint. Thanks 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
cecekpawon Posted August 29, 2016 Share Posted August 29, 2016 In "menu.c" Sherlocks, go go go 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted August 29, 2016 Share Posted August 29, 2016 In "main.c" Sherlocks, go go goThanks 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Sherlocks Posted August 29, 2016 Share Posted August 29, 2016 In "menu.c" Sherlocks, go go go okay i checked menu.c translate is good. but you can see this problem compared 2 pic. there is shown wrong word in GUI wrong in GUI right in code word is good in code, but shown not good word in GUI Link to comment Share on other sites More sharing options...
Micky1979 Posted August 29, 2016 Share Posted August 29, 2016 I think that you should look at Language.c and be sure that you are exporting your font (glyphs) in the hii database (ExportFonts function).. (easy to say ) 1 Link to comment Share on other sites More sharing options...
Slice Posted August 30, 2016 Share Posted August 30, 2016 Look in text.c where Clover makes korean glyphs. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted August 30, 2016 Share Posted August 30, 2016 Look in text.c where Clover makes korean glyphs. i touched text.c to fix korean glyphs. fontheight 20 font width 20 but still glyphs is not good. i dont know why this happen. korean glyphs is not correctly shown. example. "A - 단축키 - 이 부트로더에 대하여" <= this is right glyphs. but in GUI, not good "A - 다추키 - 이 ....." <= wrong glyphs. clover limits font height size 30 over. and english font height and korean font height size have difference. about height x2. so, "A 다추키" english font size show correclty. but korean is yellow circle means drop(limit express in gui) glyphs. sorry my english as result. english font height and korean font height size have difference also i cant touch any code. i dont know how to have structure font method in clover. i'm not professional related this issue. sorry. Link to comment Share on other sites More sharing options...
Needy Posted August 30, 2016 Share Posted August 30, 2016 i touched text.c to fix korean glyphs. fontheight 20 font width 20 but still glyphs is not good. i dont know why this happen. korean glyphs is not correctly shown. example. "A - 단축키 - 이 부트로더에 대하여" <= this is right glyphs. but in GUI, not good "A - 다추키 - 이 ....." <= wrong glyphs. clover limits font height size 30 over. and english font height and korean font height size have difference. about height x2. so, "A 다추키" english font size show correclty. but korean is 1.png yellow circle means drop(limit express in gui) glyphs. sorry my english as result. english font height and korean font height size have difference 스크린샷 2016-08-30 오후 10.15.25.png also i cant touch any code. i dont know how to have structure font method in clover. i'm not professional related this issue. sorry. Hello there, Can the Korean font be made of the english font's size? Link to comment Share on other sites More sharing options...
Sherlocks Posted August 30, 2016 Share Posted August 30, 2016 Hello there, Can the Korean font be made of the english font's size? Hello.I exprienced font ttf type. But i first see font png type. If exist some tips about png font, i can help you 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Needy Posted August 30, 2016 Share Posted August 30, 2016 Hello. I exprienced font ttf type. But i first see font png type. If exist some tips about png font, i can help you 나의 LG-F410S 의 Tapatalk에서 보냄 Here you go. http://www.insanelymac.com/forum/topic/306356-create-font-files-for-bootloader-guis/ Best of luck. Link to comment Share on other sites More sharing options...
startergo Posted September 3, 2016 Share Posted September 3, 2016 Hi guys I tried updating clover pro but I got this error: ******************************************* * Auto-Build Full Clover rEFIt_UEFI * * Revisions: edk2: 22541 * * Clover: 3728 * * Using Flags: gcc49 x64 * ******************************************* Starting >>>>New<<<< Build Process: 22:07:50 Building CloverX64, gcc49 Creating new RAM disk Initialized /dev/rdisk2 as a 256 MB case-insensitive HFS Plus volume Using TOOLCHAIN_DIR='/Users/folio/CloverGrowerPro/toolchain' running ./ebuild.sh -gcc49 -D USE_APPLE_HFSPLUS_DRIVER --x64 TOOLCHAIN_DIR: /Users/folio/CloverGrowerPro/toolchain NASM_PREFIX: /Users/folio/CloverGrowerPro/toolchain/bin/ NASM_VER: 2.12.01 your nasm is not good to build Clover! Cloverx64 ERROR!! Ejecting RAM disk "disk2" unmounted. "disk2" ejected. Link to comment Share on other sites More sharing options...
Slice Posted September 3, 2016 Share Posted September 3, 2016 Hi guys I tried updating clover pro but I got this error: ******************************************* * Auto-Build Full Clover rEFIt_UEFI * * Revisions: edk2: 22541 * * Clover: 3728 * * Using Flags: gcc49 x64 * ******************************************* Starting >>>>New Building CloverX64, gcc49 Creating new RAM disk Initialized /dev/rdisk2 as a 256 MB case-insensitive HFS Plus volume Using TOOLCHAIN_DIR='/Users/folio/CloverGrowerPro/toolchain' running ./ebuild.sh -gcc49 -D USE_APPLE_HFSPLUS_DRIVER --x64 TOOLCHAIN_DIR: /Users/folio/CloverGrowerPro/toolchain NASM_PREFIX: /Users/folio/CloverGrowerPro/toolchain/bin/ NASM_VER: 2.12.01 your nasm is not good to build Clover! Cloverx64 ERROR!! Ejecting RAM disk "disk2" unmounted. "disk2" ejected. Yes, the script failed. Try another one. Build_Clover.command, another Script to build standard Clover (or customized) Link to comment Share on other sites More sharing options...
Sherlocks Posted September 3, 2016 Share Posted September 3, 2016 @Slice i'm really busy days. sorry slice. i have some issue about converting font ttf to png. i followed http://www.insanelymac.com/forum/topic/306356-create-font-files-for-bootloader-guis/page-1 and i followed your history. but i have no lucky. hold issue like this http://www.insanelymac.com/forum/topic/306356-create-font-files-for-bootloader-guis/?p=2273209 can you give me some tips? thanks Link to comment Share on other sites More sharing options...
Sherlocks Posted September 6, 2016 Share Posted September 6, 2016 @Slice. i tested all about korean GUI. first, cecekpawon's code is good working in my skylake lg laptop(have hold oem logo, reboot loop issue), other desktop and laptop. http://www.insanelymac.com/forum/topic/306156-clover-bugissue-report-and-patch/?p=2270908. clover log in this code 0:296 0:044 === [ InitScreen ] ======================================== 0:296 0:000 SetScreenResolution: 1920x1080 - already set 0:296 0:000 Console modes reported: 5, available modes: 0:296 0:000 - [01]: 80x25 0:296 0:000 - [03]: 128x40 0:296 0:000 - [04]: 100x31 0:296 0:000 - [05]: 240x56 (current mode) 0:296 0:000 SetScreenResolution: 1920x1080 - already set 0:296 0:000 reinit: self device path=PciRoot(0x0)\Pci(0x17,0x0)\Sata(0x1,0x0,0x0)\HD(1,GPT,3C609C76-23BB-49FF-8FAF-9366AF018B11,0x28,0x64000) 0:296 0:000 Loading font from ThemeDir: Error 0:296 0:000 font image not loaded, use english 0:296 0:000 load font image type 1 0:296 0:000 Using embedded font 0:296 0:000 Font loaded: ImageWidth=176 ImageHeight=288 0:297 0:000 Font 1 prepared WxH=11x18 CharWidth=9 also this code prevent korean font glitch(screenshot blow) if i use lang ko. korean users usually havent korean font file in theme and font folder. so most of korean users have font glitch in latest clover. i already see this problem report. 2nd. i cant make font png for korean. http://www.insanelymac.com/forum/topic/306356-create-font-files-for-bootloader-guis/page-1 i tried to make korean font png many times for optiminzed in GUI. but still fail. i'm waiting blackosx response. if he give me some solution, i will solve clover korean font issue and optimize. Thank you. Link to comment Share on other sites More sharing options...
Sherlocks Posted September 11, 2016 Share Posted September 11, 2016 Many korean users reported me font glitch issue #1193 in latest clover. Need to fix like #1193. Sorry about many reply. 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Needy Posted September 11, 2016 Share Posted September 11, 2016 Many korean users reported me font glitch issue #1193 in latest clover. Need to fix like #1193. Sorry about many reply. 나의 LG-F410S 의 Tapatalk에서 보냄 Hello there, We'll look into it. ? Best regards. 1 Link to comment Share on other sites More sharing options...
Slice Posted September 12, 2016 Share Posted September 12, 2016 i touched text.c to fix korean glyphs. fontheight 20 font width 20 but still glyphs is not good. i dont know why this happen. korean glyphs is not correctly shown. example. "A - 단축키 - 이 부트로더에 대하여" but in GUI, not good "A - 다추키 - 이 ....." clover limits font height size 30 over. and english font height and korean font height size have difference. about height x2. so, "A 다추키" english font size show correclty. but korean is 1.png yellow circle means drop(limit express in gui) glyphs. sorry my english as result. english font height and korean font height size have difference 스크린샷 2016-08-30 오후 10.15.25.png also i cant touch any code. i dont know how to have structure font method in clover. i'm not professional related this issue. sorry. Hi Sherlocks, korean glyphs composed from three parts here } else { // if ((c >= 0x20) && (c <= 0x7F)) { c1 = ((c - 0x20) >> 4) * 28 + (c & 0x0F); Cho = c1; Shift = 12; } else if ((c < 0x20) || ((c > 0x7F) && (c < 0xAC00))) { Cho = 0x0E; //just a dot Shift = 8; } else if ((c >= 0xAC00) && (c <= 0xD638)) { //korean Shift = 18; c -= 0xAC00; c1 = c / 28; Jong = c % 28; Cho = c1 / 21; Joong = c1 % 21; Cho += 28 * 7; Joong += 28 * 8; Jong += 28 * 9; } // DBG("Cho=%d Joong=%d Jong=%d\n", Cho, Joong, Jong); if (Shift == 18) { egRawCompose(BufferPtr, FontPixelData + Cho * FontWidth + 4 + FontLineOffset, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } else { egRawCompose(BufferPtr + BufferLineOffset * 3, FontPixelData + Cho * FontWidth + 2, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } if (i == Cursor) { c = 99; egRawCompose(BufferPtr, FontPixelData + c * FontWidth + 2, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } if (Shift == 18) { egRawCompose(BufferPtr + 8, FontPixelData + Joong * FontWidth + 6, //9 , 4 are tunable GlobalConfig.CharWidth - 8, FontHeight, BufferLineOffset, FontLineOffset); egRawCompose(BufferPtr + BufferLineOffset * 10, FontPixelData + Jong * FontWidth + 5, GlobalConfig.CharWidth, FontHeight - 10, BufferLineOffset, FontLineOffset); } BufferPtr += Shift; } shifted by right and down. You should control geometry and propose other values to shift Cho, Joong, Jong and probably draw other font to more correct drawing. Link to comment Share on other sites More sharing options...
Sherlocks Posted September 12, 2016 Share Posted September 12, 2016 Hi Sherlocks, korean glyphs composed from three parts here } else { // if ((c >= 0x20) && (c <= 0x7F)) { c1 = ((c - 0x20) >> 4) * 28 + (c & 0x0F); Cho = c1; Shift = 12; } else if ((c < 0x20) || ((c > 0x7F) && (c < 0xAC00))) { Cho = 0x0E; //just a dot Shift = 8; } else if ((c >= 0xAC00) && (c <= 0xD638)) { //korean Shift = 18; c -= 0xAC00; c1 = c / 28; Jong = c % 28; Cho = c1 / 21; Joong = c1 % 21; Cho += 28 * 7; Joong += 28 * 8; Jong += 28 * 9; } // DBG("Cho=%d Joong=%d Jong=%d\n", Cho, Joong, Jong); if (Shift == 18) { egRawCompose(BufferPtr, FontPixelData + Cho * FontWidth + 4 + FontLineOffset, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } else { egRawCompose(BufferPtr + BufferLineOffset * 3, FontPixelData + Cho * FontWidth + 2, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } if (i == Cursor) { c = 99; egRawCompose(BufferPtr, FontPixelData + c * FontWidth + 2, GlobalConfig.CharWidth, FontHeight, BufferLineOffset, FontLineOffset); } if (Shift == 18) { egRawCompose(BufferPtr + 8, FontPixelData + Joong * FontWidth + 6, //9 , 4 are tunable GlobalConfig.CharWidth - 8, FontHeight, BufferLineOffset, FontLineOffset); egRawCompose(BufferPtr + BufferLineOffset * 10, FontPixelData + Jong * FontWidth + 5, GlobalConfig.CharWidth, FontHeight - 10, BufferLineOffset, FontLineOffset); } BufferPtr += Shift; } shifted by right and down. You should control geometry and propose other values to shift Cho, Joong, Jong and probably draw other font to more correct drawing.Thanks. First, can you add code more flexible work? Most of korean users dont have korean font file. Still suffer font issue. I think better If dont have korean font, return english font. I will check your advice. And report. Thank you 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Slice Posted September 12, 2016 Share Posted September 12, 2016 If you have no korean font then don't set language to "ko". Do you want I check the presence of this font and force switch to english menu? Link to comment Share on other sites More sharing options...
Sherlocks Posted September 12, 2016 Share Posted September 12, 2016 If you have no korean font then don't set language to "ko". Do you want I check the presence of this font and force switch to english menu? summary i set lang is "ko" in GUI, 1. if i dont have korea font png, clover automately detect korean font exist. then if check no korean font png file, clover automately switch only font english(not set en in GUI) 2. if i have korea font png, clover automately detect korean font exist, then if check korean font png file, clover use korean font file in GUI. above cases, many korean users include first case. and if i will finish to optmizing korean font, just drop korean font file in theme or font folder. then korean users wiil can use korean help in GUI so. i tested cecekpawon give me code for korean. #1169 its is good working. please check. thanks in advance. Link to comment Share on other sites More sharing options...
Slice Posted September 12, 2016 Share Posted September 12, 2016 Sorry @Sherlocks 1. Embedded font doenst come with Korean. 2. Clover failed to load "FontKorean.png" from "EFI\CLOVER\font\" or "EFI\CLOVER\themes\\". In "/Clover/rEFIt_UEFI/libeg/text.c", try to replace: EG_IMAGE * egLoadFontImage(IN INTN Rows, IN INTN Cols) { EG_IMAGE *NewImage = NULL, *NewFontImage; INTN ImageWidth, ImageHeight, x, y, Ypos, j; EG_PIXEL *PixelPtr, FirstPixel; BOOLEAN isKorean = (gLanguage == korean); CHAR16 *fontFilePath, *commonFontDir = L"EFI\\CLOVER\\font"; if (IsEmbeddedTheme() && !isKorean) { DBG("Using embedded font\n"); goto F_EMBEDDED; } else { NewImage = egLoadImage(ThemeDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName, TRUE); DBG("Loading font from ThemeDir: %a\n", NewImage ? "Success" : "Error"); } if (NewImage) { goto F_THEME; } else { fontFilePath = PoolPrint(L"%s\\%s", commonFontDir, isKorean ? L"FontKorean.png" : GlobalConfig.FontFileName); NewImage = egLoadImage(SelfRootDir, fontFilePath, TRUE); if (!NewImage) { if (!isKorean) { DBG("Font %s is not loaded, using embedded\n", fontFilePath); FreePool(fontFilePath); goto F_EMBEDDED; } FreePool(fontFilePath); return NULL; } else { DBG("font %s loaded from common font dir %s\n", GlobalConfig.FontFileName, commonFontDir); FreePool(fontFilePath); goto F_THEME; } } F_EMBEDDED: //NewImage = DEC_PNG_BUILTIN(emb_font_data); NewImage = egDecodePNG(&emb_font_data[0], sizeof(emb_font_data), TRUE); F_THEME: ImageWidth = NewImage->Width; //DBG("ImageWidth=%d\n", ImageWidth); ImageHeight = NewImage->Height; //DBG("ImageHeight=%d\n", ImageHeight); PixelPtr = NewImage->PixelData; DBG("Font loaded: ImageWidth=%d ImageHeight=%d\n", ImageWidth, ImageHeight); NewFontImage = egCreateImage(ImageWidth * Rows, ImageHeight / Rows, TRUE); if (NewFontImage == NULL) { DBG("Can't create new font image!\n"); return NULL; } FontWidth = ImageWidth / Cols; FontHeight = ImageHeight / Rows; FirstPixel = *PixelPtr; for (y = 0; y < Rows; y++) { for (j = 0; j < FontHeight; j++) { Ypos = ((j * Rows) + y) * ImageWidth; for (x = 0; x < ImageWidth; x++) { if (//WantAlpha && (PixelPtr->b == FirstPixel. && (PixelPtr->g == FirstPixel.g) && (PixelPtr->r == FirstPixel.r) ) { PixelPtr->a = 0; } NewFontImage->PixelData[Ypos + x] = *PixelPtr++; } } } egFreeImage(NewImage); return NewFontImage; } VOID PrepareFont() { EG_PIXEL *p; INTN Width, Height; if (gLanguage == korean) { FontImage = egLoadFontImage(10, 28); if (FontImage) { FontHeight = 16; GlobalConfig.CharWidth = 20; FontWidth = GlobalConfig.CharWidth; TextHeight = FontHeight + TEXT_YMARGIN * 2; DBG("Using Korean font matrix\n"); return; } else { DBG("font image not loaded, use english\n"); gLanguage = english; } } // load the font if (FontImage == NULL){ DBG("load font image type %d\n", GlobalConfig.Font); FontImage = egLoadFontImage(16, 16); } if (FontImage) { if (GlobalConfig.Font == FONT_GRAY) { //invert the font. embedded is dark p = FontImage->PixelData; for (Height = 0; Height < FontImage->Height; Height++){ for (Width = 0; Width < FontImage->Width; Width++, p++){ p->b ^= 0xFF; p->g ^= 0xFF; p->r ^= 0xFF; //p->a = 0xFF; //huh! } } } TextHeight = FontHeight + TEXT_YMARGIN * 2; DBG("Font %d prepared WxH=%dx%d CharWidth=%d\n", GlobalConfig.Font, FontWidth, FontHeight, GlobalConfig.CharWidth); } else { DBG("Failed to load font\n"); } } Sorry, it is not working Link to comment Share on other sites More sharing options...
Sherlocks Posted September 12, 2016 Share Posted September 12, 2016 Sorry, it is not working Screen Shot 2016-09-12 at 15.39.06.png Your theme 'metal' have korean font file. If you have font file, korean font shown strange. I dont know exact this issue. Also Not yet optimize korean font. 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
Recommended Posts