Comments (1)
I've encountered this bug in the past, and from what I have seen is that it happens sporadically, and is often related to a race condition between the font files being successfully loaded and when fontExists
runs (if the function runs before the files have been loaded by the browser, it will return false
).
Generally, I have seen this "fix itself" by refreshing the browser (as the font files are now cached in your browser). Unfortunately, I haven't found the perfect solution for this, and I have experimented with different preloading methods (typically defined in the <head>
). If you're ready to go down that rabbit hole, I would suggest starting by reading about FOUC: https://en.wikipedia.org/wiki/Flash_of_unstyled_content
p.s. as a quick improvement, pass fallback fonts to the fontFamily so that you don't get serif fonts here. It will use the first font that passes fontExists
(which helps with cross-browser compatibility for build-in fonts):
fontFamily: '"Droid Sans Mono", "Helvetica", "Arial", sans-serif'
from d3plus-text.
Related Issues (20)
- implement tuncateWord method
- Japanese language should be included in noSpaceRange HOT 2
- add ability to selectively turn off fontExists caching as part of TextBox HOT 3
- add support for italic labels HOT 1
- An in-range update of d3-array is breaking the build 🚨 HOT 1
- Latest changes for 0.9.36 cause text not to render
- An in-range update of d3plus-common is breaking the build 🚨 HOT 1
- detect data from pre-existing DOM elements HOT 3
- Improve wrapping behavior - break mid-word
- textSplit should not filter out all emoji unicode chars HOT 1
- textbox split property should pass through into textWrap.
- D3 and existing SVGs HOT 1
- Pipe character "|" stripped from text
- textWrap issue with overflow and long text HOT 12
- Text is not rendered in IE11 HOT 3
- Click event on wrapped text not triggering on Safari
- add macron detection to textStrip
- Docs and examples seems to be offline HOT 2
- error: transition 1 not found HOT 3
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 d3plus-text.