libretro / retroarch-assets

Assets needed for RetroArch - e.g. menu drivers, etc. Also contains the official branding.
Creative Commons Attribution 4.0 International
169 stars 160 forks source link

Script for converting BMP to BIN for RGUI Fonts #434

Closed rtomasa closed 1 year ago

rtomasa commented 2 years ago

Is it feasible to get the script or a brief explanation on how to convert the font spritesheet bitmap.bmp to bitmap.bin? I'd like to create a custom one and be able to compile in RA

baxysquare commented 2 years ago

I presume this is a reference to the RGUI Fonts? If so, it looks like @DisasterMo, @trngaje and @jdgleaver are likely the experts on this issue. If it's referring to something else in the repository, let us know.

rtomasa commented 2 years ago

Sorry, yes I was doing reference to RGUI Fonts

rtomasa commented 2 years ago

@DisasterMo, @trngaje, @jdgleaver Any possibility to get that script or some details on how to generate the bin files?

trngaje commented 2 years ago

There is no source for reference because it is reconstructed with simple c code depending on the type of input font.

-----Original Message----- From: "Rubén @.> To: @.>; Cc: @.>; @.>; Sent: 2022-06-27 (월) 19:28:01 (GMT+09:00) Subject: Re: [libretro/retroarch-assets] Script for converting BMP to BIN for RGUI Fonts (Issue #434)

@DisasterMo, @trngaje, @jdgleaver Any possibility to get that script or some details on how to generate the bin files? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rtomasa commented 2 years ago

@trngaje I'm only interested in the RGUI bitmap .BMP fonts. Maybe my understanding on how it works is not correct. I saw the sprite-sheet font.bmp in the corresponding RetroArch folder and also a font.bin file that I assumed that corresponds to the binary encoded file (assumed that you create the font.bin from font.bmp using some script). Also assumed that when compiling RA, make command will take the bin file to "generate" the font inside the C code. Maybe I'm completely wrong...

rtomasa commented 1 year ago

Solution provided in https://github.com/libretro/docs/issues/738

rtomasa commented 1 year ago

@trngaje I've finished creating and compiling my first custom font in RA and everything worked perfectly fine but the switch icons and the current selected value option indicator that display garbage. Do you know if this is something independent from the font sheet? EDIT: OK I found out that all symbol icons are hardcoded in rgui.c so now I can also customise their widths independently