Download the PHP package kartsims/easysvg without Composer

On this page you can find all versions of the php package kartsims/easysvg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easysvg

EasySVG for PHP

Generate SVG images from SVG font easily.

The SVG data produced here is directly extracted from the font .svg file. This does not use the <text> tag.

Simple usage

Advanced usage

This will output inline SVG for you to play with. You can echo it, save it to a file or whatever.

Method reference

setFont($path, $size, $color = null)

Sets the font attributes. This is a shortcut for :

These 3 methods are explicit enough, I won't go through these in here.

setUseKerning($bool)

Use SVG font kerning pairs. Default is false.

setLineHeight($value)

Adds a CSS-like line-height value. A numeric value (float) where 1 is the line height defined by the font itself.

setLetterSpacing($value)

Adds a CSS-like letter-spacing value. A numeric value (float) expressed in em where 1 is the width of the m character.

addText($text, $x, $y, $attributes=array())

Add text to the SVG (will be converted to simple path)

asXML()

Return XML string of the whole SVG.

addAttribute($key, $value)

Add an attribute to the main SVG.

SVG data manipulation methods

You may need these to play around with SVG definitions.

defTranslate($def, $x=0, $y=0)

Applies a translate transformation to a definition. This basically applies matrix calculation to a definition.

defRotate($def, $angle, $x=0, $y=0)

Applies a translate transformation to definition. This basically applies matrix calculation to a definition.

defScale($def, $x=1, $y=1)

Applies a scale transformation to definition. This basically applies matrix calculation to a definition.

textDef($text)

Returns a SVG-formatted definition of a string. This method is used by addText method.

textDimensions($text)

Returns the width and height of a string. This method is also used to set the width/height of the SVG (if none specified).

unicodeDef($code)

Returns a SVG-formatted definition of an unicode character.

characterWidth($char, $is_unicode=false)

Returns the width of a character.

addPath($def, $attributes=array())

Add a path to the SVG data

Utility methods

clearSVG()

Resets the SVG data. Used to start a new SVG without creating a new instance.

defApplyMatrix($def, $matrix)

Apply a matrix to a definition. Used to apply any kind of transformations, you shouldn't need this, but it is available so you may play with it.

License

MIT. Please feel free to pull, fork, and so on.


All versions of easysvg with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
ext-simplexml Version *
ext-xmlreader Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kartsims/easysvg contains the following files

Loading the files please wait ....