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

No Text on webOS 2 #100

Open
markus101 opened this issue Jan 24, 2020 · 9 comments
Open

No Text on webOS 2 #100

markus101 opened this issue Jan 24, 2020 · 9 comments
Labels

Comments

@markus101
Copy link

Currently I'm seeing issues with text rendering on webOS 2 devices. Since cavnas2d is used for text rendering I tested basic text rendering via canvas2d using the example here and it was displayed correctly.

So far other devices we've tested (including webOS 3.5, 4 and 4.5) all render text correctly.

LG lists the device as running WebKit 538.2 in their documentation.

Is there anything specific I need to do for older devices, such as webOS 2 TVs?

@g-zachar
Copy link
Contributor

Hi @markus101 ,

Hard to tell, it could be that Lightning was not tested on webOS 2 and there is indeed an issue in Lightning's core. Are you getting any errors or warnings?

Best regards

@markus101
Copy link
Author

Unfortunately there are no warnings or errors in the console, if I switch to canvas2d rendering I do get text rendering.

@jzolezzi
Copy link

Hi @g-zachar Is there any more logging or tracing we can enable/add that might help with figuring out why the text isn't rendering?

@g-zachar
Copy link
Contributor

Hi @jzolezzi

No, unfortunately Lightning doesn't have any tracing that would help in that matter.
Which version of Lightning are you using and which bundle? Or, are you using bundler yourself and include Lightning as module? Can you tell me more about your setup?

Best regards

@markus101
Copy link
Author

We're using version 1.4.0, with webpack + babel (babel is transpiling wpe-lighting/index.js and it's imports).

Our code is all written in TypeScript and transpiled with babel as well.

Our browserList config looks like this (though we've tried different combinations as well):

"browserslist": [
  "Chrome >= 30",
  "Safari >= 6",
  "Opera <= 15"
],

@g-zachar
Copy link
Contributor

Hey @markus101, @jzolezzi

I created and tested example project (link) on LG webOS TV emulator 2.0.0 and I'm getting different results - strangely enough webgl rendering works fine but canvas2d does not (which is pretty much the opposite result). Please try to run my app in your environment and let me know the results. If you can create example app that reproduces your bug that you can share I can look into that as well.

Best regards

@markus101
Copy link
Author

For canvas2d you'll need a polyfill for the window.ImageData constructor (this is the one thing in the PS4 thread that is the same).

This is the polyfill we're using: https://gist.github.com/Convicted202/7684bc8113b3011b4a6a1b2aa9f7a36f

On the TV itself I'm seeing the same behaviour as I do with our app, canvas2d works (once I applied the polyfill) and webgl doesn't render text. I'm not seeing it render the background either.

@markus101
Copy link
Author

markus101 commented Jan 29, 2020

I also tried adding a rectangle to your example with the following:

Rectangle: { x: 100, y: 100, w: 200, h: 100, rect: true, color: 0xFF1C27bC },

I don't see that rectangle rendered on screen either, but do in Chrome on my computer.

@g-zachar
Copy link
Contributor

Hey @markus101

At this point it seems your environment is different from what I can produce myself. I suggest putting in some debug messages of your own in Lightning and compare results of your devices vs desktop. You can also compare Lightning's context - access it by simply logging this in your root component's _init() method.

Let me know if you have any more findings regarding your issue.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants