Skip to content

Set a more usable default font size#228

Merged
WizardCM merged 1 commit into
obsproject:masterfrom
Rosuav:set-default-font-size
Jan 17, 2021
Merged

Set a more usable default font size#228
WizardCM merged 1 commit into
obsproject:masterfrom
Rosuav:set-default-font-size

Conversation

@Rosuav

@Rosuav Rosuav commented May 8, 2020

Copy link
Copy Markdown
Contributor

Description

Set a default font size of 16px to ensure that text is readable when unstyled.

Motivation and Context

The default font size in most browsers is 16px, but the default here appears sometimes to be 1px. This results in unreadable text (see eg the confusion in #226 which ultimately was caused by this), and is inconsistent.

How Has This Been Tested?

Fired up several pages. Browser plugin was built against CEF 75.1.14+gc81164e+chromium-75.0.3770.100 - didn't test with other CEF versions. It might be that this patch only benefits older browser builds, but that's still worthwhile as 3770 is the one named in the OBS installation instructions.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.

@WizardCM

WizardCM commented May 8, 2020

Copy link
Copy Markdown
Member

In testing, this is exclusive to 3770 and only on Linux as far as we could tell. Is it common for apps using CEF to manually set the font size?

@Rosuav

Rosuav commented May 8, 2020

Copy link
Copy Markdown
Contributor Author

I'm not saying the bug is exclusive to 3770/Linux - just that that's all I have access to test it on. I'm currently trying to build other CEFs for testing, but that's its own job and may or may not succeed.

@Rosuav

Rosuav commented May 8, 2020

Copy link
Copy Markdown
Contributor Author

No idea how common it is for apps to manually set the font size, but given that I'm setting it to the most commonly-used default, it's going to do nothing if it wasn't a problem.

@WizardCM

WizardCM commented May 8, 2020

Copy link
Copy Markdown
Member

No I know, I mean when we were preparing 25.x builds with the browser source, we ran into the same issue, and the reason we ended up jumping to 3809 on our official build on Linux is because the issue didn't occur there. We originally thought it was a rendering bug, but turned out to be font-size related.

Personally I think this change is fine if other browsers also use it as default, as long as we can verify that.

@Rosuav

Rosuav commented May 8, 2020

Copy link
Copy Markdown
Contributor Author

Actually, can confirm that this does not happen on 3809, so this is a fix to ensure that the version listed in the installation instructions does work. Alternatively, changing the installation instructions (and including a fully-built CEF for download) would resolve this issue.

@aerogus

aerogus commented May 11, 2020

Copy link
Copy Markdown

Great idea this default font size. It may resolve the bug I have with "em" or "rem" units in my CSS. I had to switch to "px" units.

@Rosuav

Rosuav commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

Yes, it should resolve that (based on my testing).

@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Aug 20, 2020
@WizardCM WizardCM merged commit ab86905 into obsproject:master Jan 17, 2021
@WizardCM WizardCM added this to the OBS Studio 27.0 milestone Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants