Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25982

Re: Capturing 'new line' info from div

From Ed Jay <edMbj@aes-intl.com>
Newsgroups comp.lang.javascript
Subject Re: Capturing 'new line' info from div
Date 2014-10-24 08:31 -0700
Message-ID <01sk4a9cea4onkfvgpbib11cb61dsvj4ph@4ax.com> (permalink)
References <sv6j4a1bb9p53to2ak8v0ccsrf0v0clbpn@4ax.com> <hFq2w.477328$u11.100889@fx12.fr7>

Show all headers | View raw


On Fri, 24 Oct 2014 13:23:57 +0200, Chris Winter wrote:

>Am 24.10.2014 02:36, schrieb Ed Jay:
>[...]
>> I want to place the contents of each div onto a canvas
>> This works, with the exception that none of the line breaks,
>
>fillText ignores line wrapping. You'll probably have to roll
>your own solution that splits the text appropriately and calls
>fillText for each line. Be wary of solutions out there in
>the web, as they often use unreliable shortcuts to "calculate"
>line heights. If you're making a one-platform, one-font solution,
>you can probably survive with hard-coding line offsets. Otherwise
>you'll have to decide which downsides of the approaches you can
>live with.
>
Thanks, Chris. 

I am using a single-platform/font, so I guess my weekend is cut out
for me. :-)  Thanks, again.
-- 
Ed Jay (remove 'M' to respond by email)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Capturing 'new line' info from div Ed Jay <edMbj@aes-intl.com> - 2014-10-23 17:36 -0700
  Re: Capturing 'new line' info from div Chris Winter <thepoet@a-za-z0-9.de> - 2014-10-24 13:23 +0200
    Re: Capturing 'new line' info from div Ed Jay <edMbj@aes-intl.com> - 2014-10-24 08:31 -0700

csiph-web