Comments (6)
Hey, sorry for the delayed response. If you guys have a minimal testcase, I'd love to take a look and see what's going on there.
from fabric.js.
Hey, thanks, but we're using http://code.google.com/p/canvas-text/ now for text rendering and fabric for the rest, not that pretty but it works.
from fabric.js.
I am trying out fabric.Text now as well, and am just trying to put it in the demo case.
I first included cufon.js (dL'ed from github), as otherwise it didn't know about it.
Then I added canvas.add(new fabric.Text('Hello')); to the demo.js, instead of a Rect, but am getting:
Uncaught TypeError: Object function () {
return api.replace.apply(null, arguments);
} has no method 'replaceElement'
_renderall.js:8053
renderall.js:8087
_draw
Do you know what's going on there? Thanks!
from fabric.js.
Sorry, my bad. I somehow missed Cufon from the dependencies. It's now under /lib and is included as part of a final build.
The reason text wasn't working is because there has to be a font file, describing how glyphs are to be rendered. I included some of the free fonts under /test/fonts — (http://github.com/kangax/fabric.js/tree/gh-pages/test/fonts); You can use Cufon builder to create them yourself (from .ttf, .otf, etc.) — http://cufon.shoqolate.com/generate/
I added a text object (rendered in "Delicious" font) to the demo page, as an example.
Hope this helps.
from fabric.js.
Thanks so much, great to have text be in the demo now.
from fabric.js.
fabric.util.loadImage( ' ../sample.png' , function(img){
});
Uncaught TypeError: object.render is not a function
fabric.StaticCanvas.fabric.util.createClass._onObjectAdded @ fabric.js:6378
fabric.Collection.add @ fabric.js:198
this image object move and not add the client side in image function.
how to solve this function...
from fabric.js.
Related Issues (20)
- Unable to Disable Editing/Interaction with Objects on Canvas
- [QA]: Upper Canvas and Lower Canvas not working together well after zooming HOT 7
- [Bug]: Generate unique id for all objects
- [Bug]: npm miss a versionThere is a 5.3.1 package missing on the npm repository HOT 4
- [Bug]: Ability to draw on image not working on iOS
- [Bug]: When freeDrawingBrush is set to string HOT 4
- Using custom build file with nodejs throws window undefined error HOT 1
- [Bug]: Regression: creating a polyline/polygon with skewX at initialization time creates wrong bounding box HOT 5
- [Bug]: Single or first StaticCanvas on page is blurry / doesn't respect enableRetinaScaling HOT 3
- [Feature]: Add Display P3 color space HOT 4
- [Feature]: no able to load svg using loadsvgfromurl and add into canvas HOT 3
- [Bug]: Input range for strokeDashArray's not updated & Clone issue from object with ID HOT 2
- willReadFrequently: true dosent wonk in Chrome Version 119.0.6045.106 HOT 1
- [Bug]: The bounding box disappear if scaling Y for a Rectangle whose strokeWidth = 0 and initial height = 0 HOT 1
- [Feature]: How to non proportionally scale the four diagonal angles of a dragging rectangle? HOT 3
- [Feature]: I want to eidt rect like add rect freely! help me ,i paste code and image in bottom HOT 2
- [Bug]: Border of clipping Group (with layout: 'clip-path') don't equal limits of group if clipPath have params another then {left: 0, top: 0}. HOT 5
- [Feature]: Allow passing custom Canvas instance on NodeJs instead of using node-canvas HOT 4
- [Bug]: Missing text position in SVG HOT 15
- `endCurrentTransform` severe bug
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 fabric.js.