Skip to content

Conversation

@AKuHAK
Copy link
Contributor

@AKuHAK AKuHAK commented Dec 8, 2024

No description provided.

FontMFile = open("rom0:FONTM", O_RDONLY);
if(FontMFile < 0)
{
FontMFile = open("mc0:FONTM", O_RDONLY);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to use a relative path?

Just saying

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not safe to rely on CWD inside library as current working dir can randomly change during library use but call to the FONTM should remain intact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But do you close and open the file? If the file is left opened, changes to CWD in libc later on during runtime should not matter.

Personally, I feel that it should be the software engineer's responsibility that the files are accessible where it matters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, totally forgot about closing

@sp193
Copy link
Member

sp193 commented Dec 9, 2024

Given that this file technically belongs to the OSD (which the PSX does not have, thus the file is absent), why not consider the use of another font library like FreeType? You would be also free to choose whatever font you want, which is also required to enable the use of additional languages.

Is the aim purely about making the fontm library work on more hardware? I think that is fine too.

@AKuHAK AKuHAK marked this pull request as draft December 9, 2024 10:15
@AKuHAK
Copy link
Contributor Author

AKuHAK commented Dec 9, 2024

Currently the aim is to provide at least something for DESR users to get rid of crashing applications, its pure workaround for projects that heavily rely on FONTM usage. But yes , seeing open source alternative for FONTM would be nice.

P.S. made a mistkae, will try to fix it today.

@uyjulian
Copy link
Member

KROM could be another alternative font file, and is also on DESR and PS3 PS2 emulator

@sp193
Copy link
Member

sp193 commented Dec 10, 2024

At some point, I used KROM. It is ugly and has a different format from FONTM.

If code changes can be made, I would suggest not coupling the app with some board-specific file.

I believe that AKuHAK's motivation is to provide a drop-in solution for apps that were made to use FONTM, but there is no desire to rework said apps to use a different font-rendering library.

@AKuHAK AKuHAK closed this Dec 12, 2024
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.

4 participants