AvaloniaUI / Avalonia.HtmlRenderer

Avalonia front-end for the HtmlRenderer project.
MIT License
135 stars 34 forks source link

font-weight appears to recognise only normal and bold #33

Open kuiperzone opened 1 year ago

kuiperzone commented 1 year ago

The CSS style font-weight:400; generates bold. It would be nice if this recognised numbers.

maxkatz6 commented 1 year ago

HtmlRenderer adapter layer has only these values: https://github.com/ArthurHub/HTML-Renderer/blob/a004aefeb87b5226aece75c49e84040dbaf9f3e0/Source/HtmlRenderer/Adapters/Entities/RFontStyle.cs#L21-L28

We should stop using the original repo as a submodule, and instead copy-paste its source code to this repo. Allowing us to fix these problems.

kuiperzone commented 1 year ago

Thank you. That's good to know. Think the render is a brilliant control, though it's support may be a tad limited.

kuiperzone commented 1 year ago

The demo is not the easiest thing to build, even after installing all the workloads. Is there a pre-built desktop demo (either Windows or Linux)?

maxkatz6 commented 1 year ago

You can unload mobile projects, then it should be fine. Or you can build Desktop project specifically, without building mobile projects.

kuiperzone commented 1 year ago

What's meant to be in "external"?

image

kuiperzone commented 1 year ago

I'm guessing this might be a clue?

image

maxkatz6 commented 1 year ago

You need to clone submodules as well:

git submodule init 
git submodule update
Gillibald commented 1 year ago

Ideally we directly fork the original project to be able to make changes to it

maxkatz6 commented 1 year ago

@kuiperzone I just rebased fork onto this repository, so both code bases are combined in this repo. Now it should be possible to make any changes and send PRs. We are not very familiar with the original HtmlRenderer code base, but I can help reviewing if you can send any fixes/features. Possibly some PRs can be ported from https://github.com/ArthurHub/HTML-Renderer/pulls.

kuiperzone commented 1 year ago

That's great. Just raising issues as I find them so there is some record.