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

Some parts of the chm manual file are in a very small font #3780

Open
lkintact opened this issue Sep 24, 2024 · 10 comments
Open

Some parts of the chm manual file are in a very small font #3780

lkintact opened this issue Sep 24, 2024 · 10 comments

Comments

@lkintact
Copy link

lkintact commented Sep 24, 2024

Some parts of the chm version of the manual are in a very small font, they are underlined in red in the picture below (that's at "PHP Manual -> Function reference -> Image Processing and Generation -> ImageMagick -> Installing/Configuring -> Installation"):
chm_manual_small_font

OS: Windows 10 Home.

@Girgias
Copy link
Member

Girgias commented Sep 24, 2024

Maybe @mumumu has an idea? As IIRC they know how to build the CHM version.

But this might be an issue with PhD our doc renderer.

@jimwins
Copy link
Member

jimwins commented Sep 24, 2024

This is probably a missing style for the CHM version (which basically just a particular HTML format). Looks like it is for anything that ends up in a <var> tag, so filenames, environment variables, and other variables. I can blindly change the stylesheet for the CHM version (chm/make_chm_style.css in doc-base, I think) to see if it helps, but I don't have any Windows systems to test it on. (There's a style for 'PRE', I'd make it 'VAR, PRE' to see if that helps.)

Looks like @bjori is involved in the building of the CHM versions, they may have more insight.

@bjori
Copy link
Member

bjori commented Sep 24, 2024

Sounds like a good theory @jimwins . Give it a try and see if @lkintact can verify if it worked.
I don't think I ever had first-hand experiencing using the chm builds :)

@jimwins
Copy link
Member

jimwins commented Sep 24, 2024

Looking at it more, it's actually probably one of the CSS files in the htmlhelp/suppfiles directory of doc-base. But I'm not even sure how/when this gets rebuilt because the CHM files were last updated about two months ago.

It should be possible to use GitHub Actions to build these. There's a command-line HTMLHelp compiler so then it's "just" a matter of building the proper input, running that, and making the output available somewhere. That's going to require someone with more active Windows knowledge than I have, though.

@cmb69
Copy link
Member

cmb69 commented Oct 4, 2024

I've downloaded php_manual_en.chm, and it looks fine in HTML Control 10.0:

chm

It looks the same if I build that file manually.

I can imagine the problem is that the Source Code Pro font is not installed on the machine. I think it's best to use standard fonts for the CHMs (or to embed the fonts if allowed and possible).

And frankly, I'm not sure whether CHM is future proof; I didn't even find a downloadable help compiler (but had it installed already, after looking more closely), and apparently MS considers the format obsolete. Maybe PDF is the way to go.

@jimwins
Copy link
Member

jimwins commented Oct 8, 2024

Strange, I thought I saw the download for the tools just recently, but poking around more it seems like the only way to get them is the Wayback Machine or other sketchy links.

If we don't want to create a way for us to build the CHM manuals, it's probably time to retire them. PhD doesn't currently work for PDF, but that's not really a close analogue to CHM, anyway. Maybe ePub would be a good alternative? The current tooling seems to work for generating it.

I don't think there's a way we can do something like the CHM with user notes that we had that would be worth the effort in doing so.

@cmb69
Copy link
Member

cmb69 commented Oct 8, 2024

Yeah, maybe ePub is the better alternative. I'm more concerned about php/systems#58 for now.

@mumumu
Copy link
Member

mumumu commented Oct 11, 2024

I'm aware of this problem myself, it's caused by css not working properly anymore.

The reason chm hasn't been able to update for 2 months is because my local machine was down. Sorry, I can resume updating as soon as you're ok with the version without css running.

But as @cmb69 pointed out, chm is obviously legacy; the relevant binaries needed to build chm are already unavailable for download, and I only have what I have on hand. I'll continue to fix this issue and update chm if there's demand, but if you can migrate to PDF or epub, I'd be happy to do so.

@cmb69
Copy link
Member

cmb69 commented Oct 11, 2024

I had a look at this again, and apparently, there is almost no CSS involved (except for style.css). Instead, the problem seems to be related to the <var> elements; on my machine they render fine, but that might depend on the reader (and the underlying rendering engine), and given that <var> is relatively new, it might just be not properly recognized. So if we want to stick with minimal styling, we should probably replace <var> with <code> or something.

Or we try to bring back proper stylesheets, which are supported by the HTML help compiler. There is of course no guarantee that these styles would be properly supported by all readers (although ePub likely has the same issue).

@cmb69
Copy link
Member

cmb69 commented Oct 11, 2024

I have manually replaced all var(…) in the stylesheets with their values, and removed the :root selector. Afterwards, HTML help workshop did no longer complain about the stylesheets, and here the result looks like:

chm

It might be worthwhile to automate this step, so we can ship with full CSS again.

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

No branches or pull requests

6 participants