FormidableLabs / radium-typography

Radium typography component. Includes utilities for text measurement.
MIT License
3 stars 0 forks source link

Story: text measurement for Victory labels #10

Open tptee opened 8 years ago

tptee commented 8 years ago

From https://github.com/FormidableLabs/victory-label/issues/35

I think it makes more sense to have a separate abstraction for measuring text, in a separate library, which would allow the render step to call something like measureText(labelText, font) and synchronously get the size back.

As a Victory component, I want a synchronous measureText function that returns the width and height of any given string.

This will be a plain function instead of a component.