You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by xing zhang <zh...@gmail.com> on 2017/11/05 04:22:40 UTC
the max-width for css-style should be taken into consideration when
drawing text
Hi , I open an issue for support max-width in iOS, as it works well
both on Android and web.
As I test the css for `max-width`, it works well both on Android and Web
platform except iOS.
Here is the test code on DotWe website:
http://dotwe.org/vue/7e556c582a55630518d0bf6336ddde0e
When meassuring the width of drawing text , the max-width of css-style
should take into consideration.It seems that only width for css-style works.
The attachment is the screenshot both on iOS and web(html5).
..
[image: 内嵌图片 1]
And later, I will open an pull request to resolve this bug.
回复:the max-width for css-style should be taken into consideration when drawing text
Posted by "谷宝剑(剑白)" <ji...@alibaba-inc.com>.
great work, specific width and height, improve text measure performance.
------------------------------------------------------------------发件人:xing zhang <zh...@gmail.com>发送时间:2017年11月6日(星期一) 10:55收件人:dev <de...@weex.incubator.apache.org>主 题:Re: the max-width for css-style should be taken into consideration when drawing text
It's related with the algorithm drawing text: consider width first, if the
css width is not specified, (consider about max-width now ) then we use
`infinite` width as it's width meassuring the height. But people may don't
know it's text width , the max-width is set.
In a words, calculate text height accords the width input.
As for max-height in mdn:
https://developer.mozilla.org/en-US/docs/Web/CSS/max-height , max-height
overrides height, but min-height overrides max-height. It behaves more
like `height`. They all clip the content when it's content exceeded, so
people can now specify height.
We consider max-height/height less when drawing text, people can use
`height` to clip content calculated.
2017-11-05 14:16 GMT+08:00 Adam Feng <cx...@gmail.com>:
> Thanks for your contribution, I have seen the pull request and reviewed
> the code, it looked good to me, can `max-height` also be supported?
>
> Thanks.
> Adam Feng
>
> On 5 Nov 2017, 12:22 PM +0800, xing zhang <zh...@gmail.com>,
> wrote:
> > Hi , I open an issue for support max-width in iOS, as it works well
> both on Android and web.
> >
> > As I test the css for `max-width`, it works well both on Android and Web
> platform except iOS.
> > Here is the test code on DotWe website:
> >
> > http://dotwe.org/vue/7e556c582a55630518d0bf6336ddde0e
> >
> > When meassuring the width of drawing text , the max-width of css-style
> should take into consideration.It seems that only width for css-style works.
> >
> > The attachment is the screenshot both on iOS and web(html5).
> >
> > ..
> >
> >
> >
> > And later, I will open an pull request to resolve this bug.
>
Re: the max-width for css-style should be taken into consideration
when drawing text
Posted by xing zhang <zh...@gmail.com>.
It's related with the algorithm drawing text: consider width first, if the
css width is not specified, (consider about max-width now ) then we use
`infinite` width as it's width meassuring the height. But people may don't
know it's text width , the max-width is set.
In a words, calculate text height accords the width input.
As for max-height in mdn:
https://developer.mozilla.org/en-US/docs/Web/CSS/max-height , max-height
overrides height, but min-height overrides max-height. It behaves more
like `height`. They all clip the content when it's content exceeded, so
people can now specify height.
We consider max-height/height less when drawing text, people can use
`height` to clip content calculated.
2017-11-05 14:16 GMT+08:00 Adam Feng <cx...@gmail.com>:
> Thanks for your contribution, I have seen the pull request and reviewed
> the code, it looked good to me, can `max-height` also be supported?
>
> Thanks.
> Adam Feng
>
> On 5 Nov 2017, 12:22 PM +0800, xing zhang <zh...@gmail.com>,
> wrote:
> > Hi , I open an issue for support max-width in iOS, as it works well
> both on Android and web.
> >
> > As I test the css for `max-width`, it works well both on Android and Web
> platform except iOS.
> > Here is the test code on DotWe website:
> >
> > http://dotwe.org/vue/7e556c582a55630518d0bf6336ddde0e
> >
> > When meassuring the width of drawing text , the max-width of css-style
> should take into consideration.It seems that only width for css-style works.
> >
> > The attachment is the screenshot both on iOS and web(html5).
> >
> > ..
> >
> >
> >
> > And later, I will open an pull request to resolve this bug.
>
Re: the max-width for css-style should be taken into
consideration when drawing text
Posted by Adam Feng <cx...@gmail.com>.
Thanks for your contribution, I have seen the pull request and reviewed the code, it looked good to me, can `max-height` also be supported?
Thanks.
Adam Feng
On 5 Nov 2017, 12:22 PM +0800, xing zhang <zh...@gmail.com>, wrote:
> Hi , I open an issue for support max-width in iOS, as it works well both on Android and web.
>
> As I test the css for `max-width`, it works well both on Android and Web platform except iOS.
> Here is the test code on DotWe website:
>
> http://dotwe.org/vue/7e556c582a55630518d0bf6336ddde0e
>
> When meassuring the width of drawing text , the max-width of css-style should take into consideration.It seems that only width for css-style works.
>
> The attachment is the screenshot both on iOS and web(html5).
>
> ..
>
>
>
> And later, I will open an pull request to resolve this bug.