Comments (8)
Add string parameter testString
into config, to test if the font is loaded completed or not.
- Fill
0
within an internal canvas. - Draw
testString
. - Check if any pixel has non-zero value.
Here is a test.
from phaser3-rex-notes.
Here is my result of running demo in chrome(upper texts) and firefox (lower texts), the looks of font in these 2 browsers seems not the same.
But the result in anther environment looks good.
It might be a complex issue I guess. I will try to solve it later.
from phaser3-rex-notes.
Thanks for the answer.
To see more complex result for this specific font, you should consider using native letters, e.g.
'שלום עולם!'
I mentioned Chrome and Firefox because it is not visible at all in Firefox and it is easier to see the problem (imho).
For example,
first time:
and second (with cache)
from phaser3-rex-notes.
Reproduced in your test snipped also:
from phaser3-rex-notes.
Yes, I see that weird result. I modified test code to show 'Hello' and שלום' עולם!' .
1st time, 'Hello' will be shown, 2nd time, all words will be shown, like you said. Since 'Hello' is shown, I thought that font was loaded completed. But I have no idea why עולם!' is not shown, sorry.
from phaser3-rex-notes.
It seems that some parts of font is not loaded completed, i.e. trigger 'active' event (an internal event of google webfont loader) too early.
Maybe I could add a string parameter, to check if this specific string is drawn on a background text object.
from phaser3-rex-notes.
Wow, looks like a magic :)
from phaser3-rex-notes.
Issue solved.
from phaser3-rex-notes.
Related Issues (20)
- Circular import in TweakerShell HOT 1
- update functions missing from IStateConfig type in FSMBase.d.ts HOT 2
- Namespace has no exported member HOT 5
- Lock joystick on horizontal axis HOT 2
- dynamic set card face HOT 6
- Images with your shaders break when window is resized using Phaser 3.60 HOT 1
- Monopoly not finding the path HOT 6
- [img] not working with rexUiTextbox typewriter. HOT 6
- "hidden" objects added to scrollable panel (both fixWidthSizer and Sizer) reappear on scroll HOT 3
- Property 'Board' does not exist on type 'typeof BoardPlugin'. HOT 3
- Cannot read properties of undefined (reading 'moveToward') HOT 1
- How to set a fixed width and scale a board? HOT 1
- zoom-in-out HOT 1
- upgrade to 1.60.6,destroy container will crash. HOT 3
- Add [id=][/id] tags to BBCode text HOT 5
- [!] RollupError: "default" is not exported when attempting to import plugin into phaser3-typescript-project-template HOT 5
- areaclick event blocked for bbCodeText in a TextBox with interactive set to true HOT 2
- Drop Shadow pipeline broken in Phaser 3.70 HOT 14
- scene.rexUI.add.label is broken HOT 7
- Wrong touch with Virtual Joystick using the camera (PHASER 3) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phaser3-rex-notes.