Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fonts are too wide / wrong size in some games compared to original system (PSP) fonts #2788

Closed
sceckSukoSuLi opened this issue Jul 15, 2013 · 34 comments
Labels
PGF / sceFont Issue involves PGF fonts.
Milestone

Comments

@sceckSukoSuLi
Copy link

See screenshot than you see the Problem.

font fail

@TallgeeseHeaven
Copy link

You need the actual PSP font I think. It's illegal for the emulator authors to distribute.

@solarmystic
Copy link
Contributor

It is as @TallgeeseHeaven has mentioned.

Rip your own PSP's original fonts, or live with it for now.

@hrydgard
Copy link
Owner

We could probably make a custom font file that looked better, but it's a lot of work so I haven't really prioritized it.

@thedax
Copy link
Collaborator

thedax commented Jul 16, 2013

You can also try one of the various PGF font packs out there on the web, but there are no promises they'll look good or work well with PPSSPP.

@papel
Copy link

papel commented Sep 2, 2013

We need to know what games use PSP fonts.
Lunar: The Silver Star and Phantasy Star Portable 2 do.
According to the log, the English version of both games loaded all fonts, including jpn0.pgf and kr0.pgf.

In the last versions, the fonts in Phantasy Star are acceptable, despite they are not perfect. The fonts in Lunar continue bad.

@unknownbrackets
PGF is rasterized, is not it? Do you know a PGF editor?
Do you know which file from ltn0.pgf to ltn15.pgf is used by Lunar?
I will try to edit the file on Paint to improve Lunar.

@unknownbrackets
Copy link
Collaborator

Some games I know of that use (or at least link) sceFont to one degree or another:

  • Yu-Gi-Oh Tag Force games
  • Jeanne d'Arc
  • Crush
  • Tales of the World: Radiant Mythology 1/2/3
  • Dissidia
  • Lunar
  • Monster Hunter games
  • Gundam vs. Gundam Next Plus
  • Sword Art Online
  • God Eater Burst 1/2 *
  • Senjou no Valkyria 2/3 *
  • Exit
  • Naruto Ultimate Ninja Heroes 3
  • .hack//Link
  • Lord or Arcana / Apolcalypse
  • Neverland Card Battles
  • Ragnarok Tactics
  • Tales of the Heroes: Twin Brave
  • Holy Invasion of Privacy, Badman
  • Mad Blocker Alpha
  • Final Fantasy 3
  • Fieldrunners
  • Phantasy Star Portable 1/2
  • Metal Gear Solid: Peace Walker
  • Persona 3 Portable

(Marked with * means very limited usage afaik.)

They are raster, yes. This is a tool to generate PGF fonts:
https://github.com/tpunix/pgftool

As far as the fonts, I don't remember which one is Lunar. You can tell relatively easily by renaming I guess. IIRC it's a large one, probably 0?

0 is Latin large
1 is Latin large with serifs
2 is Latin large in italics
3 is Latin large in italics with serifs
4 in Latin large in bold
5 in Latin large in bold with serifs
6 in Latin large in bold italic
7 in Latin large in bold italic with serifs

8-15 are the same again, but Latin small.

Lunar uses one of the small ones in the initial intro, iirc, and large ones in dialogs. The small one is too large, but the ascenders/etc. are approximately correct. The large one is too large also, but the ascenders are also wrong.

-[Unknown]

@papel
Copy link

papel commented Sep 2, 2013

Thanks.
Lunar uses ltn12.pgf. The size is 33% larger.
I dumped the bmp files, but I have problems to assembly it back to pgf.

@unknownbrackets
Copy link
Collaborator

Width is also an issue. All the characters need to basically fit neatly within their box. Th is i s wh yyou get bad kerni ng i n Di ssi di a, or at least used to.

IIRC the width is not far off (which can matter since some games hard wrap, including Lunar) but the height is too much.

-[Unknown]

@papel
Copy link

papel commented Sep 3, 2013

I resized some bmp files and I need to test them.
How to convert the bmp files to pgf? I do not understand what mix_pgf does.

@thedax
Copy link
Collaborator

thedax commented Feb 3, 2014

Is there much of a point keeping this open anymore? We've been through various fonts, and if the user doesn't like the ones we supply, it's not difficult to swap them out for real PSP fonts (though IIRC Android/iOS users are still out of luck).

@unknownbrackets
Copy link
Collaborator

You can swap out on all platforms, but it'd be nice to improve the fonts shipped by default to have a similar size...

-[Unknown]

@solarmystic
Copy link
Contributor

@thedax

Actually, I've managed to successfully swap the real PSP fonts in PPSSPP on my JB'ed Ipad 3 retina by manually going to where the program has been installed by Cydia, and using FTP (OpenSSL on the Ipad 3 and winscp551 on the Windows 7 laptop), transferring it from my the ppsspp folder on my PC to that particular folder.

The font folder on the JB'ed iOS Cydia ppsspp installation (using angelxwind's repo) is located in
(from the root of the file system)

/private/var/stash/Applications.ReFxd1/PPSSPP.app/assets/flash0/font

The only issue with this method is that once I remove that version of PPSSPP to upgrade it to the latest one on her repo, I have to replace the font files again, since they are considered to be a part of the orignal package. The ini files are actually saved in between installations, so are the games on the iOS device (obviously).

@unknownbrackets
Copy link
Collaborator

@solarmystic you don't have to do that. You can place them in a flash0 directory inside the PSP folder. Specifically, it looks for a folder ms0:/PSP/flash0/font/. If any file exists there, it is used instead of the standard one by sceFont.

This works on all platforms.

-[Unknown]

@solarmystic
Copy link
Contributor

@unknownbrackets

The only thing about what you suggested that does not quite work out is the fact that the iPad (and indeed all iOS devices) don't use/have any external storage that would use the ms0: (memory stick) moniker. Hmm...

@unknownbrackets
Copy link
Collaborator

Well, assuming that you can save games on your iPad, it means there is a PSP directory somewhere. That is what I'm referring to. On Windows, "ms0:/" means "memstick/ in either the PPSSPP directory or My Documents".

On Android, "ms0:" typically means "/sdcard/".

On Linux, "ms0:" typically means "~/.config/ppsspp/PSP/".

I don't remember what it means on iOS. But it is the same place your savedata and savestates reside.

-[Unknown]

@solarmystic
Copy link
Contributor

Ahh, I see what you mean, but the location is different for the JB'ed iOS PPSSPP installation.

It's over here instead:- /private/var/mobile/Documents/PSP/flash0/font

I have to create the flash0 and font folders manually. And yes, it does work that way, thanks for the heads up.

@unknownbrackets
Copy link
Collaborator

Right. Like the ini files and your savedata, this won't be deleted when you upgrade.

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Apr 26, 2014

Probably this one should be closed ? I think @thedax ask the same question 3 months ago :)

@unknownbrackets
Copy link
Collaborator

If you think this should be closed, you haven't played many games with the default fonts.

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Apr 26, 2014

We definitely need to ship a better default font before this can be worthy of closing. The current one isn't that great.

@unknownbrackets
Copy link
Collaborator

So, I'm implementing a little font editor. I'm thinking this will be the best way to get correct metrics.

So far it can load pgf fonts and display characters for editing, but can't save yet, shadows not supported yet, and the character map is not implemented yet. For simplicity, I'm just implementing it for the web browser (client side only.)

Anyway, I'm thinking to allow loading a font to work on, and a "reference font". The reference font would show the metrics (advance, w/h, etc.) for next to your glyph's metrics. Need to allow editing those, and maybe ideally visualizing them but I'm probably not gonna do that.

Also need to add a "palette" or something. There's 16 colors, dragging over each box 15 times to make it 100% is kinda too much, heh.

-[Unknown]

@hrydgard
Copy link
Owner

Very cool! Could generate the shadows automatically with a little darken + blur, too.

@unknownbrackets unknownbrackets added the PGF / sceFont Issue involves PGF fonts. label Feb 15, 2015
@superostrich
Copy link

I've been using the texture replacement feature to replace the individual characters for specific titles, and the results are quite good, but it is extremely labor intensive and has to be done on a per-game, per-language basis.

ULUS10511_00089

Would it be possible to have a similar dump -> load feature for the entire system font? If the entire font could be dumped-to / loaded-from a single texture it would be ideal.

@unknownbrackets
Copy link
Collaborator

Essentially, that is what a PGF is - the font textures, plus numbers about how big and how wide each character is.

Of course, only a fraction of games use PGFs (system fonts.) A lot of games don't. There's no way to just do it once for those. I'd guess around 15%, but lower if you don't count minis.

But note that PGFs are rendered to RAM and the way the API works - it's much more complicated to upscale them than regular textures. We could try to track as they are copied around in RAM or something, but it might become per-game and labor intensive for that to work everywhere too.

-[Unknown]

@nassau-tk
Copy link
Contributor

Fixed these PGF font below.
Jpn0.pgf (Including : Japanese/Chinese/English)
ltn0.pgf / ltn2.pgf / ltn4.pgf / ltn6.pgf
ltn1.pgf / ltn3.pgf / ltn5.pgf / ltn7.pgf
I want check & test by many user.

I can't make "ltn8~15" (Small size English PGF font) now.
But,Many games will become playing smooth by above modified fonts.
(...I believe....)

nassau-tk added a commit to nassau-tk/ppsspp that referenced this issue Nov 28, 2020
This modified fonts will solved hrydgard#9466.(QIX++)
And,It will solved the few part of hrydgard#2788 too.(Example:LUNAR)
hrydgard pushed a commit that referenced this issue Nov 29, 2020
* ltn0/2 a little fix.

* Modified ltn8~15.pgf (Small Latin)

This modified fonts will solved #9466.(QIX++)
And,It will solved the few part of #2788 too.(Example:LUNAR)
@nassau-tk
Copy link
Contributor

nassau-tk commented Nov 29, 2020

I made Small Fonts.
And, It was merged.
Please test it everyone!
modified pgf files are below.
ltn8.pgf
ltn9.pgf
ltn10.pgf
ltn11.pgf
ltn12.pgf
ltn13.pgf
ltn14.pgf
ltn15.pgf

Test Target)
QIX++
LUNAR
etc....

@nassau-tk
Copy link
Contributor

@hrydgard
@unknownbrackets

and ALL

This issue is started 8 years ago.
I think can be closed now.
Because,All PPSSPP original fonts are modified/fixed already now.
(Of course,Not perfectlly yet.)
If you need to more brush up about "shape/gap/margin" then we should reopen it or open other topic.

How do you think about it?

@unknownbrackets
It was possible to make with the history of your making.
Thank you very much.

@Sanaki
Copy link

Sanaki commented Dec 2, 2020

Just disabled my own font dumps and tested the new ones out on Jeanne d'Arc (one of the sensitive titles). Gotta say, it looks fantastic, and damn close to the real fonts. The prior experience without those dumps was... unpleasant to say the least.

@nassau-tk
Copy link
Contributor

@Sanaki

Even if there was a conversion tool, font making was handwork.
I didn't have knowledge of a programming conversely, but it was fitting work for me with leisure time.:smile:
Because I don't know how much users there are on earth in the whole world, but it's wasteful that this wonderful emulator seems regrettable because of just characters.
Thank you very much for your wonderful report!

@hrydgard
Copy link
Owner

hrydgard commented Dec 2, 2020

Thanks again for your great work @nassau-tk :)

@hrydgard hrydgard closed this as completed Dec 2, 2020
@unknownbrackets unknownbrackets modified the milestones: Future, v1.11.0 Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PGF / sceFont Issue involves PGF fonts.
Projects
None yet
Development

No branches or pull requests