search for: word_wrap

Displaying 19 results from an estimated 19 matches for "word_wrap".

2005 Nov 20
2
word_wrap with hard break
How can I force word_wrap to break text like this? <% @text=''abcdefghijklmnopqrstuvwxyz'' %> <%= word_wrap(@text, 10) %> It appears to currently only break on space characters. thanks csn __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. ht...
2007 Oct 18
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...; int i, width, diff; - gboolean changed; g_return_val_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text), FALSE); @@ -811,6 +764,14 @@ swfdec_text_field_movie_auto_size (SwfdecTextFieldMovie *text) swfdec_text_field_movie_free_layouts (layouts); layouts = NULL; + if ((text->text->word_wrap || SWFDEC_MOVIE (text)->original_extents.x1 - + SWFDEC_MOVIE (text)->original_extents.x0 == width) && + (SWFDEC_GRAPHIC (text->text)->extents.y1 - + SWFDEC_GRAPHIC (text->text)->extents.y0 == height)) + return FALSE; + + swfdec_movie_invalidate (SWFDEC_MOVIE...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...paragraphs[i].indent < 0) { - // limit negative indent to not go over leftMargin + blockIndent - int indent = MAX (paragraphs[i].indent / PANGO_SCALE, - -(block->left_margin + block->block_indent)); - layout.render_offset_x += indent; - width += -indent; - } - - if (text->word_wrap) { - pango_layout_set_wrap (playout, PANGO_WRAP_WORD_CHAR); - pango_layout_set_width (playout, width * PANGO_SCALE); - pango_layout_set_alignment (playout, block->align); - pango_layout_set_justify (playout, block->justify); - } else { - pango_layout_set_width (playout, -1); - } - -...
2007 Jan 08
8
word wrap ?
Hi, I have long lines of text stored in a DB without line breaks. Now I need to present it in fixed width with word wrap. I tried everything css (word-wrap: break-word;), the rails actionview helper (word_wrap), specifying width of the div etc. But nothing works. The reason I''m asking the question here because to me word_wrap was created to solve this exact problem but it is failing to do so. Correct me if i''m wrong. Regards Manu --~--~---------~--~----~------------~-------~--~----~...
2007 Oct 14
0
10 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...5d3b2..98383bd 100644 --- a/libswfdec/swfdec_text_field.c +++ b/libswfdec/swfdec_text_field.c @@ -141,8 +141,12 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr, width += -paragraphs[i].indent / PANGO_SCALE; } - pango_layout_set_width (playout, - (text->word_wrap ? width * PANGO_SCALE : -1)); + if (text->word_wrap) { + pango_layout_set_wrap (playout, PANGO_WRAP_WORD_CHAR); + pango_layout_set_width (playout, width * PANGO_SCALE); + } else { + pango_layout_set_width (playout, -1); + } // set paragraph styles if (block->ind...
2006 Nov 08
3
long words killing HTML display
Hi, I''m trying to use word_wrap to prevent long ''aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...'' from kill my display tables in HTML. Problem is that word_wrap doesn''t dissect these long words and expects to only break them if it sees a ''\n''. Does anybody know if Rails has a hel...
2012 Jan 15
1
Word Wrap
Hello, I have to write a big sentence with cat() and I would like that R automatically adds a new line when it is needed (when the text arrives at the end of the window), the same as Windows Notepad does (Word Wrap). How could I do? Thank you F.
2007 Oct 14
1
libswfdec/swfdec_text_field.c
...ap is off diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c index 2f38d85..96284a8 100644 --- a/libswfdec/swfdec_text_field.c +++ b/libswfdec/swfdec_text_field.c @@ -150,6 +150,8 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr, if (text->word_wrap) { pango_layout_set_wrap (playout, PANGO_WRAP_WORD_CHAR); pango_layout_set_width (playout, width * PANGO_SCALE); + pango_layout_set_alignment (playout, block->align); + pango_layout_set_justify (playout, block->justify); } else { pango_layout_set_width (playout, -1); } @@...
2007 Oct 29
0
libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...ext) return FALSE; swfdec_text_field_movie_get_text_size (text, &width, &height); - width += 2 * EXTRA_MARGIN; - height += 2 * EXTRA_MARGIN; + width += SWFDEC_DOUBLE_TO_TWIPS (2 * EXTRA_MARGIN); + height += SWFDEC_DOUBLE_TO_TWIPS (2 * EXTRA_MARGIN); if ((text->text->word_wrap || graphic->extents.x1 - graphic->extents.x0 == width) && diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c index dd5203f..248d878 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -424,7 +4...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...CALE; + pango_layout_get_pixel_size (playout, &layout.width, &layout.height); + layout.width += layout.render_offset_x + block->right_margin; + layout.height += block->leading / PANGO_SCALE; + + layouts = g_array_append_val (layouts, layout); if (!text->word_wrap) break; } } - return layouts; + if (num != NULL) + *num = layouts->len; + + return (SwfdecLayout *)g_array_free (layouts, FALSE); } void @@ -270,10 +272,10 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr, SwfdecColor background_color, const SwfdecColorT...
2007 Dec 10
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_color_as.c libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_as_drawing.c
...002,7 +1012,7 @@ swfdec_text_field_movie_auto_size (SwfdecTextFieldMovie *text) graphic->extents.y1 - graphic->extents.y0 == height) return FALSE; - swfdec_movie_invalidate (SWFDEC_MOVIE (text)); + swfdec_movie_invalidate_next (SWFDEC_MOVIE (text)); if (!text->text->word_wrap && graphic->extents.x1 - graphic->extents.x0 != width) @@ -1031,7 +1041,7 @@ swfdec_text_field_movie_auto_size (SwfdecTextFieldMovie *text) } swfdec_movie_queue_update (SWFDEC_MOVIE (text), - SWFDEC_MOVIE_INVALID_CONTENTS); + SWFDEC_MOVIE_INVALID_EXTENTS);...
2007 Oct 19
1
3 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field_movie.c
libswfdec/swfdec_html_parser.c | 89 +++++++++++++++++++++++------------- libswfdec/swfdec_text_field_movie.c | 1 2 files changed, 60 insertions(+), 30 deletions(-) New commits: commit b4c20d7519ae5d93c9ba3258bde8444aebdd1be6 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Fri Oct 19 15:32:39 2007 +0300 If closing tag doesn't match in the HTML parser, close tags
2008 Jul 26
4
simple_format, (long) urls, and wrapping
I''m using simple_format to format and display posted content from users. This content sometimes has urls in it. The problem I''m having is that if the urls are long enough to wrap, they do, but the url gets split with a <br> tag. Then, if the user clicks on the link, only the first, non-wrapped part of the link gets posted to the browser... and that''s an invalid
2007 Oct 14
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h
...hs[i].indent / PANGO_SCALE; + // limit negative indent to not go over leftMargin + blockIndent + int indent = MAX (paragraphs[i].indent / PANGO_SCALE, + -(block->left_margin + block->block_indent)); + layout->render_offset_x += indent; + width += -indent; } if (text->word_wrap) { commit 3000a03cfb7eeea8c55b8975802a98ec6baa8265 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Sun Oct 14 12:53:50 2007 +0300 Add support for vertical scrolling to the rendering part of TextField diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c inde...
2007 Nov 04
0
7 commits - libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_field_movie_html.c
...agraphs[i].index_ + block->index_ + skip, - paragraphs[i].length - block->index_ - skip); + paragraphs[i].length - block->index_ - skip - + (paragraphs[i].newline ? 1 : 0)); } + end_of_paragraph = TRUE; if (iter->next != NULL && text->text->word_wrap) { PangoLayoutLine *line; @@ -593,12 +599,15 @@ swfdec_text_field_movie_get_layouts (SwfdecTextFieldMovie *text, int *num, pango_layout_index_to_line_x (playout, length - skip, FALSE, &line_num, NULL); - line = pango_layout_get_line_readonly (playout, line_num); - skip_new =...
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
...aphs[i].length - block->index_ - skip); + } else { + pango_layout_set_text (playout, + text->input->str + paragraphs[i].index_ + block->index_ + skip, + paragraphs[i].length - block->index_ - skip); + } if (iter->next != NULL && text->text->word_wrap) { diff --git a/libswfdec/swfdec_text_field_movie.h b/libswfdec/swfdec_text_field_movie.h index 3970436..4c4af82 100644 --- a/libswfdec/swfdec_text_field_movie.h +++ b/libswfdec/swfdec_text_field_movie.h @@ -79,6 +79,8 @@ struct _SwfdecTextFieldMovie { SwfdecTextField * text; /* the text...
2007 Oct 29
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h
...ext->text->auto_size == SWFDEC_AUTO_SIZE_NONE) return FALSE; - swfdec_text_field_get_size (text, &width, &height); + swfdec_text_field_movie_get_text_size (text, &width, &height); + width += 2 * EXTRA_MARGIN; + height += 2 * EXTRA_MARGIN; if ((text->text->word_wrap || graphic->extents.x1 - graphic->extents.x0 == width) && diff --git a/libswfdec/swfdec_text_field_movie.h b/libswfdec/swfdec_text_field_movie.h index 15af317..4a03fdd 100644 --- a/libswfdec/swfdec_text_field_movie.h +++ b/libswfdec/swfdec_text_field_movie.h @@ -120,7 +120,7 @@ GTyp...
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...g *)data.tags_closed->data; diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c index 7b5c688..a11e2f1 100644 --- a/libswfdec/swfdec_text_field.c +++ b/libswfdec/swfdec_text_field.c @@ -113,7 +113,7 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag) text->word_wrap = swfdec_bits_getbit (b); text->multiline = swfdec_bits_getbit (b); text->password = swfdec_bits_getbit (b); - text->input = !swfdec_bits_getbit (b); + text->editable = !swfdec_bits_getbit (b); has_color = swfdec_bits_getbit (b); has_max_length = swfdec_bits_getbit (b);...
2007 Oct 18
0
14 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_format.c
...g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); + g_return_if_fail (width != NULL || height != NULL); layouts = swfdec_text_field_movie_get_layouts (text, NULL, NULL, NULL, NULL); - width = 0; - height = 3; for (i = 0; layouts[i].layout != NULL; i++) { if (!text->text->word_wrap) { - if (layouts[i].width > width) - width = layouts[i].width; + if (width != NULL && layouts[i].width > *width) + *width = layouts[i].width; } - height += layouts[i].height; + if (height != NULL) + *height += layouts[i].height; } swfdec_text_field_...