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

Serious Fonts Rendering Bug #5021

Closed
patrickm opened this issue Jun 23, 2016 · 8 comments
Closed

Serious Fonts Rendering Bug #5021

patrickm opened this issue Jun 23, 2016 · 8 comments
Assignees

Comments

@patrickm
Copy link

This is a very serious bug with disappearing fonts/texts after opening a frameless window.

Versions:

  • Affected nwjs versions: 0.14.x and 0.15.x (tested)
  • Affected os: win7, os x 10.11.5 (tested)
  • Possible bug in nwjs / chromium: nwjs

Bug Description:

Site uses custom fonts via @font-face.

Set custom font to h1 and h2, hide h2.

Open a frameless window with css that has the same @font-
face declarations.

Show h2, h2 text won't be visible unless you toggle some css in devtools.

Reproduction:

  1. Clone https://github.com/patrickm/nwrenderingbug
  2. run nwrenderingbug project as nwapp in nw 0.14.x or nwjs 0.15.x (mac or win)

Related bugs:

Maybe it's related to NSWindow warning: adding an unknown subview

See #4336

@patrickm
Copy link
Author

image

Notice test2 has no text in red box

@rogerwang rogerwang self-assigned this Jun 23, 2016
@rogerwang
Copy link
Member

Does it happen only with frameless window? Your screenshot shows a framed window.

And does the page work well in Chromium browser in the same system?

@patrickm
Copy link
Author

This screenshot shows the finished state, when you run demo there's a button that will load a frameless window and then it will display red boxes (2 and 4)
@rogerwang please clone this repo and run it yourself

It works in any browser, in general that bug is only present in nwjs because it's happening after you show element in dom AFTER opening a frameless window

@rogerwang
Copy link
Member

I tried you sample and I don't think frameless matters -- if I change it to "frame: true" the demo still behave the same way.

When you said "it works in any browser", do you have a comparable case working in browser? -- do the same window opening trick as well. It may probably behave the same way in browser. Maybe the window opening trick triggers some issue inside chromium browser.

@patrickm
Copy link
Author

You're right, fame:false doesn't change anything.
It works in chrome and canary - meaning texts display properly

Makes it unrelated to #4336

@rogerwang any ideas ?

@patrickm
Copy link
Author

I would say.. if it's not related to frame setting it makes this issue even widespread and more dangerous

@patrickm
Copy link
Author

patrickm commented Jun 23, 2016

Updated https://github.com/patrickm/nwrenderingbug to support testing in browser, opened window now has a frame

btw. --disable-gpu --force-cpu-draw does not help either

@rogerwang
Copy link
Member

rogerwang commented Jun 23, 2016

Thanks for the demo. I made a PR for your repo to make it work in Chrome browser as a Chrome App so that we are testing the same thing (in your version the callback is called as timeout callback, not exactly the same time as in my version where it is a window open callback). Unfortunately Chrome has this bug too. NW behaves the same as Chrome browser. So it should be reported to upstream: http://crbug.com/

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

2 participants