Giter Site home page Giter Site logo

easysvg's People

Contributors

franzz avatar greendrake avatar joewhitsitt avatar kartsims avatar mrk-j avatar ppelisset avatar rac2030 avatar ricardoboss avatar smartman avatar splitbrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

easysvg's Issues

Space characters lead to fatal errors

Fatal error: EasySVG->defScale(NULL, 0.048828125, -0.048828125)
So probably missing glyph. A workaround would be - if I knew - to just look for unicode 32 or 13, and then just add a manual spacing.
If I knew how, I'd probably add this myself, too :D

cu, w0lf.

SVG-Font-Files not working

I've downloaded different font files from https://google-webfonts-helper.herokuapp.com/fonts and used the svg-font-file from the archive. But the result is not the expected one. I can read the text only very hardly.

Could you please explain, where or how to get usable font-files for the class? The included svg-font works as expected, but I need another font.

How can placed svg x and y to 0

It is possible to placed the svg horizontal und vertical to zero? When yes, how?

-----------------
|This IS A TEXT
|

The Box of "This IS A TEXT" should to zero of x and y positition.

Greetings
Sebastian

Padding above line

I am testing out your library and must say it is AWESOME.
The only real issue I am having is that when I create the SVG, there is signifigant padding.

For example.
I have an svg that is 144px tall.
The actual path is only 84px tall.
And there is 60px of empty space on the top.

2015-11-17

Background image for SVG

Hi

I can generate the SVG image using easySVG. Is it possible to add a background image to the generated CSV. I tried to add a background image in the style attribute but it is not working.

Please suggest how I can do it.

Thanks

Width and Height

Hello

I've read on the stackoverflow-page that you want to know what features you could integrate into this nice project. I would say that the most needed feature would be a bounding box like the GD Lib offers for Fonts, so I know how big of a box my String will generate at the given Fontsize and with a given font. Also: Linebreak :)

Best wishes
Mortimer

Custom class names or ids for paths

Provide ability to inject custom ID or class to each line of text (path)

For example it would be nice to create an id for the SVG #myfirstsvg
and then each path have an id #line-1 #line-2 #line-3

This would allow better flexibility when working with the SVG using Javascript

Tag a (stable) version

We'd like to use your libary and it would greatly help us if you could tag a (stable) version.

resize

I have noticed that when resize the svg displayed on webpage with css height weight defined it does not reduced the svg display size but show half part of it instead ( shows partial svg ) . Is there something can be done to output

center text?

Hi there, i will use your paths inside a common svg container. I need to center the text. Can i generate the svg with 100% height and width and then center the text inside?

SVG size to match SVG content

I wonder if there is a way to resize the SVG  to match its content only. Right now I have a difference between the height of the SVG tag, and the height of the path within this SVG:

svg

The font in this example is transformed in a single path, not embed font.

My php code:

$svg = new EasySVG();
$svg->setFontSVG($svgFont->filename);
$svg->setFontSize(100);
$svg->setFontColor('#000000');
$svg->setLineHeight(0);
$svg->setUseKerning(true);
$svg->addText($demoText);
list($textWidth, $textHeight) = $svg->textDimensions($demoText);
$svg->addAttribute("viewbox", "0 0 $textWidth $textHeight");
$svg->addAttribute("width", $textWidth."px");
$svg->addAttribute("height", $textHeight."px");
$svg->addAttribute("preserveAspectRatio","none");

Could be related to #23

Need help with your Library

Hi there,
sorry for get in touch with you via this way.
I'm using this awesome library for generating a path with text. Is it possible to manipulate the created path for example mirroring text, aligning text or changing the ratio?
Thank you.

Danny

Vertical Alignment Off

I am trying to vertically align text, but its definitely off. When I look at your textDimensions method I am a little confused on exactly what this calculation does:

$lineHeight = ( $this->font->ascent + $this->font->descent ) * $fontSize * 2;

Is this really getting the line height of the text? The ascent usually comes in as a positive number, and the descent a negative number. 1 + -1 = 0, how is this measuring distance? Could this be related to to the vertical centering issue?

color code letters

I wanted to color code letters and create them into word by word like following example.

can this library can do this?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.