Giter Club home page Giter Club logo

Comments (4)

gwwar avatar gwwar commented on May 24, 2024

Since dominant-baseline is in the SVG 1.1 spec, I would say go ahead with mapping the values rather than adding in a hack for IE9.

from canvas2svg.

KoKuToru avatar KoKuToru commented on May 24, 2024

Just checked again and found http://bl.ocks.org/eweitnauer/7325338
dominant-baseline looks broken in chrome, firefox looks useable (not 100% perfect).
It's not only IE9, newest IE can't render it too.

I could use https://github.com/Pomax/Font.js but I think it's overkill.

But yeah I would prefer dominant-baseline.

from canvas2svg.

gwwar avatar gwwar commented on May 24, 2024

Yup, IE looks about like the image below. To be fair though, chrome, FF and safari are returning differing results on the lesser used values (the SVG spec is huge), but since alphabetical, hanging and middle are somewhat reasonable I think it's ok to go ahead and map the values. I would rather keep a simple mapping with valid SVG, instead of forcing text position encoding into the output. (The other SVG viewers should in theory implement it properly in the future).

ie9

from canvas2svg.

KoKuToru avatar KoKuToru commented on May 24, 2024

Chrome in windows is correct (text-before is incorrect)
Chrome Windows;
unbenannt
I wonder why it looks wrong on my linux-maschine. Must be a bug in Chromium.
Chrome Linux:
unbenannt

OH ! Linux looks correct with 100% zoom..
4k Display here default 125% zoom.
The dashed border show the position I had originally (before scaling down to 100%)

So yeah I will implement the dominant-baseline-version !

from canvas2svg.

Related Issues (20)

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.