Skip to content

Fontlib#3772

Open
w1naenator wants to merge 116 commits intoshadps4-emu:mainfrom
w1naenator:fontlib
Open

Fontlib#3772
w1naenator wants to merge 116 commits intoshadps4-emu:mainfrom
w1naenator:fontlib

Conversation

@w1naenator
Copy link
Contributor

@w1naenator w1naenator commented Nov 4, 2025

  1. Remove libSceFont.sprx, libSceFontFt.sprx, and libSceFreeTypeOt.sprx from the shadPS4 sys_modules directory (optional).

  2. Dump the folders /preinst/common/font and /system/common/font2 from your PS4.

  3. Create a new folder (preferably inside the shadPS4 directory) named sys_fonts, and place the two dumped folders into it.

  4. If the fonts are located outside the default shadPS4 sys_fonts directory, open config.toml in the shadPS4 directory and, under [General], set sysFontPath = "full\path\to\folder\where\font\and\font2\folders\located\" to the path of the folder you created that contains the dumped font folders.

@itPost-PlcBNN-ship-it

This comment was marked as abuse.

@itPost-PlcBNN-ship-it

This comment was marked as abuse.

@thethunderturner

This comment was marked as off-topic.

@itPost-PlcBNN-ship-it

This comment was marked as abuse.

@gandalfthewhite19890404

For what you using config json? We are not ready for that.
First of all you need to move existing settings from toml to json, after that - use it

@gandalfthewhite19890404

GTS:
very loooooooong boot process
image
image
image

@gandalfthewhite19890404
image

@georgemoralis
Copy link
Collaborator

For what you using config json? We are not ready for that. First of all you need to move existing settings from toml to json, after that - use it

this was my addition. Correctly fonts settings are new settings so won't affect something

@gandalfthewhite19890404
Copy link

gandalfthewhite19890404 commented Jan 17, 2026

That it should looks like, main build with all lle modules
image

@GHU7924
Copy link

GHU7924 commented Jan 17, 2026

@w1naenator Please include these instructions in your first comment for future testers:

  1. Remove your libSceFont, libSceFontFt, and libSceFreeTypeOt from your shadPS4 sysmodules.

  2. Dump the folders /system/common/font2 and /preinst/common/font from your PS4

  3. Make a new folder somewhere (preferable in the shadPS4 directory) called fonts. Put the 2 fodlers you dumped there.

  4. Open the config.toml file in the shadps4 directoy, and under [General] change the path sysFontPath to the path of the fonts folder you made (that contains the dumped fonts folders)

And maybe I'm missing something, but is there a good reason why we don't yet have a Fonts directory (with font and font2 folders) and a default path to it? It would be easier if we already had all of this, and users just had to place these files in the folders. This would also simplify the Wiki instructions (because they will definitely come in handy after this merge campaign is complete).
CLI users will be able to change the path manually if needed, and QtLauncher users should be able to change the path in the "Paths" tab.

P.S. I'm getting a bit off topic, but perhaps we should add a new "Paths" tab in the settings. By this I mean we will have two tabs: "Paths" - this will contain paths to games, add-ons, updates and mods, and the second tab could be called "Additional Paths" and will contain paths specific to the emulator, such as saves, fonts, modules, etc.

@thethunderturner
Copy link
Contributor

@w1naenator Please include these instructions in your first comment for future testers:

  1. Remove your libSceFont, libSceFontFt, and libSceFreeTypeOt from your shadPS4 sysmodules.
  2. Dump the folders /system/common/font2 and /preinst/common/font from your PS4
  3. Make a new folder somewhere (preferable in the shadPS4 directory) called fonts. Put the 2 fodlers you dumped there.
  4. Open the config.toml file in the shadps4 directoy, and under [General] change the path sysFontPath to the path of the fonts folder you made (that contains the dumped fonts folders)

And maybe I'm missing something, but is there a good reason why we don't yet have a Fonts directory (with font and font2 folders) and a default path to it? It would be easier if we already had all of this, and users just had to place these files in the folders. This would also simplify the Wiki instructions (because they will definitely come in handy after this merge campaign is complete). CLI users will be able to change the path manually if needed, and QtLauncher users should be able to change the path in the "Paths" tab.

P.S. I'm getting a bit off topic, but perhaps we should add a new "Paths" tab in the settings. By this I mean we will have two tabs: "Paths" - this will contain paths to games, add-ons, updates and mods, and the second tab could be called "Additional Paths" and will contain paths specific to the emulator, such as saves, fonts, modules, etc.

I think a default path was already added. Build the latest version, try running a game, and you will see a sys_fonts folder in the shadps4 folder. If you specify a path in sysFontPath the emu will take that path. If you leave it empty, then it will take the fonts from sys_fonts

@georgemoralis
Copy link
Collaborator

since this has become overweighted i suggest we keep the lle modules in emulator.cpp so if they exist it can be used instead of HLE ones . Fixes can be done in following pr's

@GHU7924
Copy link

GHU7924 commented Jan 29, 2026

since this has become overweighted i suggest we keep the lle modules in emulator.cpp so if they exist it can be used instead of HLE ones . Fixes can be done in following pr's

I'm not sure this will be the right decision. If we merge this now, everyone will ignore HLE because it's easier for people to use multiple LLE modules. Later, when the switch to HLE occurs, users will simply forget about this PR and might start reporting font issues en masse.

In my opinion, it's better to merge this PR with the LLE disregard, meaning LLE will only be used with previous emulator versions, and the upcoming 0.14.0 release will follow the new rules. All we need to do is add information to the wiki according to the instructions in the first comment to this PR and create a separate issue (similar to 496 - [Aggregate issue] Missing opcodes), linked to on the wiki, to collect font-related feedback, where the logs will contain the strings [Lib.Font]

@w1naenator
Copy link
Contributor Author

GT Sport is a well-known title that does not work with our HLE. I cannot yet identify the exact cause. The main suspected reason is that it uses extremely large scaling values (e.g., 100000). Another issue is that it does not call the standard rendering API; instead, it appears to use its own custom rendering pipeline or internal rendering framework.

@georgemoralis
Copy link
Collaborator

GT Sport is a well-known title that does not work with our HLE. I cannot yet identify the exact cause. The main suspected reason is that it uses extremely large scaling values (e.g., 100000). Another issue is that it does not call the standard rendering API; instead, it appears to use its own custom rendering pipeline or internal rendering framework.

The thing that this game doesn't work anyway it is not a stop point for merging :D it can be fixed later . Does this work with LLE fonts?

@w1naenator
Copy link
Contributor Author

GT Sport is a well-known title that does not work with our HLE. I cannot yet identify the exact cause. The main suspected reason is that it uses extremely large scaling values (e.g., 100000). Another issue is that it does not call the standard rendering API; instead, it appears to use its own custom rendering pipeline or internal rendering framework.

The thing that this game doesn't work anyway it is not a stop point for merging :D it can be fixed later . Does this work with LLE fonts?

Yes, it seems that when the modules are loaded, the game cannot load the system fonts and therefore falls back to external fonts.

w1naenator and others added 6 commits February 14, 2026 00:02
Move internal font structs, aliases, and helpers out of font.cpp into shared internal headers/sources.
Promote shared ABI-facing types (including FontHandleOpaqueNative and layout/system-use structs) into font internal headers and remove function-local duplicates.
Move FreeType driver/renderer table construction into fontft_internal.cpp and wire fontft.cpp to internal getters.
Ensure internal.cpp implementations are declared in headers; deduplicate declarations and clean includes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants