Comments (18)
Huh... That's really weird, the font is based on the language, not the region, and the scaling is based on the loaded font so it should never scale the standard font...
Couple questions that might help narrow down why this would happen:
- Do you have a custom font? (Settings -> GUI Settings -> Use Custom Font)
- Is your console set to Chinese or English?
- Is Universal-Updater set to Chinese or English?
from universal-updater.
it should never scale the standard font...
but CHT and CHS has different font size than KOR/JPN.
- Do you have a custom font? (Settings -> GUI Settings -> Use Custom Font)
this setting is off and I didn't ever turn it on here
- Is your console set to Chinese or English?
the console has single language (i.e. Chinese) can be selected
- Is Universal-Updater set to Chinese or English?
setting it to Chinese or English doesn't affect font scaling here
FYI: other application has similar problem, but normally they're showing smaller font size. for example, mgba-emu/mgba#961
from universal-updater.
Huh, yeah it should use the correct font for Chinese and scale it appropriately, but the standard (English, Japanese, etc) font shouldn't be messed with...
On my American 3DS the fonts are all loaded and scaled correctly, so not sure why it's wrong here... Maybe C2D_FontLoadSystem()
is somehow broken on Taiwan systems? Looking at other apps nothing else appears to explicitly load the system fonts with that...
Can you try this build? It forces the font to use the Taiwan version so if it still loads the standard one I'm going to assume that C2D_FontLoadSystem() is broken on Taiwan systems and I'll try work around that...
Edit: Can you try this build too? It has C2D_FontLoadSystem() commented so if it does load the Taiwan font correctly then there's definitely a problem there.
Universal-Updater.zip
from universal-updater.
Can you try this build? It forces the font to use the Taiwan version so if it still loads the standard one I'm going to assume that C2D_FontLoadSystem() is broken on Taiwan systems and I'll try work around that...
this is a bit better with system font, but font size is still not scaled correctly
Edit: Can you try this build too? It has C2D_FontLoadSystem() commented so if it does load the Taiwan font correctly then there's definitely a problem there.
Universal-Updater.zip
same as screenshot above
EDIT: I think the problem is in Universal-Team/Universal-Core@be0f078#diff-4b0ede31b7a39085dcf44821151f9b41dfe9922d59fa0467ca79364906d77b91R224
since default system font size is 24px instead of 30px in CHT systems, size *= 1.3f
is too big. and I did wonder why you need to manipulate y
here (I haven't read through all logics)
from universal-updater.
... alright I have no idea why it's doing that so I'm just going to try doing this like the other apps with a scale based on the loaded font's size
size *= 30.0f / C2D_FontGetInfo(fnt ? fnt : Font)->tglp->cellHeight;
instead of trying to be fancy
if(!fnt) {
switch(loadedSystemFont) {
case CFG_REGION_CHN:
y += 3.0f * size;
break;
case CFG_REGION_TWN:
size *= 1.3f;
y += 2.5f * size;
break;
case CFG_REGION_KOR:
y += 3.0f * size;
break;
default:
break;
}
}
This makes them look slightly too big and not have enough top padding, but they're at least close...
Does this at least work for you?
Universal-Updater.zip
from universal-updater.
EDIT: I think the problem is in Universal-Team/Universal-Core@be0f078#diff-4b0ede31b7a39085dcf44821151f9b41dfe9922d59fa0467ca79364906d77b91R224
since default system font size is 24px instead of 30px in CHT systems, size *= 1.3f is too big. and I did wonder why you need to manipulate y here (I haven't read through all logics)
I have it edit the Y because the Chinese and Korean fonts (at least the ones on my American 3DS) have less padding on the top so to keep vertical centering looking the same I have it increase the Y position a bit.
And huh, does C2D_FontGetInfo(Font)->tglp->cellHeight
give 24 for you? It's 20 on the Taiwan font for me... If the fonts on actual Taiwan consoles are larger that'd explain it I suppose
from universal-updater.
This is what the fonts look like for me (American font dumps in Citra, though it looks basically the same on console)
If anything the old code has it rendering a bit too small for me, I based the scale on the size so that the Hànzì matched the size of the Kanji in Japanese, but that makes the Latin text a bit on the small side. The new code's latin text matches up decently but Hànzì are much bigger than Japanese and it's all a bit too high...
from universal-updater.
and this is how it(latest auto-updated by itself) shows in my CHT device (with CHT firmware)
from universal-updater.
Hmm, did you try this latest version I sent? https://github.com/Universal-Team/Universal-Updater/files/6214923/Universal-Updater.zip (Sorry kinda buried it ;P)
If that works the same as it does for me I guess I'll just switch to that, it's the same as what new-hbmenu does so it should work
from universal-updater.
Hmm, did you try this latest version I sent? https://github.com/Universal-Team/Universal-Updater/files/6214923/Universal-Updater.zip (Sorry kinda buried it ;P)
from universal-updater.
Ah, I see the problem. Citro2D has this built in already, however it seems that for some reason it only works on actual Chinese consoles
https://github.com/devkitPro/citro2d/blob/e4196339707e87d6e362206b49ae26e6c0c72011/source/text.c#L74
s_textScale = 30.0f / glyphInfo->cellHeight;
scaleX *= s_textScale;
scaleY *= s_textScale;
So it should work if I just don't do the scale if the region matches the font... Can you test this build? (I enabled Korean temporarily for this too so if this works can you make sure that all (standard, china, taiwan, and korea) fonts are correct?)
from universal-updater.
Ah, I see the problem. Citro2D has this built in already, however it seems that for some reason it only works on actual Chinese consoles
https://github.com/devkitPro/citro2d/blob/e4196339707e87d6e362206b49ae26e6c0c72011/source/text.c#L74
s_textScale = 30.0f / glyphInfo->cellHeight;
scaleX *= s_textScale;
scaleY *= s_textScale;So it should work if I just don't do the scale if the region matches the font... Can you test this build? (I enabled Korean temporarily for this too so if this works can you make sure that all (standard, china, taiwan, and korea) fonts are correct?)
OK it works well in Chinese language now
but if it is set with English on CHT firmware, the problem is not fixed:
from universal-updater.
Ahhhhhhhhhhhh, assuming I'm reading it right, Citro2D calculates the size to scale the fonts using the default font, but then applies that to all fonts, so on Chinese / Taiwanese / Korean consoles it breaks any font that isn't the default.
Can you test this build? This should be the last fingers crossed Universal-Updater.zip
(thanks for testing this all for me btw 😄)
Edit: I went back to my original scaling as I think that looks the best, but do you think it's a bit too small still? I could maybe do 1.4x or 1.5x or so instead of 1.3x (assuming this even works at all)
from universal-updater.
Can you test this build? This should be the last fingers crossed Universal-Updater.zip
yeah it works, but instead, font size is too small in Chinese language now:
from universal-updater.
Alright, nice! Committed it (4c792a1) with a slightly larger font size
from universal-updater.
Are you able to test these two builds and see how the font looks in each? Something, I think devkitPro/citro2d#37, broke my previous workarounds and made the Chinese font too big for me on my USA consoles.
In these I've reverted the font region specific size adjustments and that fixes them all on my USA console, however I'm not sure if the console region specific adjustments are needed. nofontfix
just prints with no console region specific adjustments while fontfix
still has the console region specific adjustments.
from universal-updater.
so fontfix version is too small in CHT devices.
from universal-updater.
Thanks!
And nice, it seems to be fully fixed in Citro2D, no more weird workarounds required.
from universal-updater.
Related Issues (20)
- [Bug Report] Invalid Unistore HOT 6
- [Feature Request] Option for Nightly updates
- [Bug Report] I can not find "CPyMO" in Universal-Updater but I was found it on Website. (Maybe Universal-DB update doesn't work?) HOT 6
- Endless check for UniStore updates
- [Bug Report] Compilation HOT 7
- [Feature Request] log
- [Feature Request] OGG HOT 2
- [Feature Request] Instruction manual for Universal Updater 3DS HOT 1
- Ryukyuan language translation HOT 10
- [Bug Report] Add Unistore UI Bug HOT 1
- WarioWare D.I.Y. DS saves but with the Wii's and DLC content HOT 3
- [Bug Report] Retroarch assets saved to wrong directory
- Download stuck. HOT 1
- Dark theme for universal updater HOT 1
- [Feature Request] Option to change the default sorting
- delete https://github.com/Universal-Team/Universal-Updater/issues/133 (it's just a troll page) along with deleting this issue too just like how https://github.com/Difegue/DoujinSoft/issues/26 and some openemu issues are actually deleted. HOT 1
- [Bug Report] HOT 2
- Arm9 Error when going into universal updater[Bug Report] HOT 2
- [Bug Report] UU locking up when closing HOT 5
- [Bug Report] broken directory settings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal-updater.