Questions tagged [text-width]

33 questions
24
votes
3 answers

How to calculate the string width in iText?

I am using iText to write a PDF. In some cases, I need to sign the PDF with the SetVisibleSignature function. With this function, we need to designate the rectangle that we will write the content into. But it's hard for me to calculate how wide the…
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133
11
votes
3 answers

Prevent automatic line wrapping when editing git commit message in vim

I want to do the opposite of this question: Automatically wrap long Git commit messages in Vim Somehow, git decided it wants to wrap my commit messages at 72 characters. I don't want them wrapped at all... and I didn't do anything to enable the…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
9
votes
2 answers

vim text width reformat

I want to reformat my file so the max line width is 79. I did :set tw=79 and gggqG and the results weren't what I expected. When a line is less than 79 col, characters from the line below it move up and lines with over 79 col don't break into two…
deadghost
  • 5,017
  • 3
  • 34
  • 46
6
votes
4 answers

Vim: disable word wrapping for specific lines

I am using :set textwidth=80 to make the Vim editor do hard wrapping automatically. However, sometimes for certain lines within a file (e.g. tables in LaTeX), I do not want Vim to do any hard wrapping automatically. Is there a way to mark certain…
Liw
  • 377
  • 2
  • 4
  • 12
5
votes
2 answers

how to measure text width in kineticjs?

Is there a method or workaround to return the text width of a string in a Text Shape, in KineticJs? I would need it to position precisely the TextShape on the canvas.
seinecle
  • 10,118
  • 14
  • 61
  • 120
5
votes
1 answer

How do I format as indicated below?

These are my format options in .vimrc: set formatoptions=tqronw set formatlistpat=^\\([\\-\\*]\\\|[0-9]\\+[.)]\\)\\s* set textwidth=72 set autoindent 1) My text: - This is my text this is my text this is my text this is my text this is my text this…
Reman
  • 7,931
  • 11
  • 55
  • 97
4
votes
1 answer

CSS position:relative and -webkit-transform creates text weight glitch

When a CSS animation is triggered and an object is positioned with CSS to be anything other than static (relative, absolute, etc) the text inside the object suddenly goes very thin for the duration of the animation. It then reverts back to full…
Bryce
  • 6,440
  • 8
  • 40
  • 64
3
votes
2 answers

Flutter problem getting text-height with LineMetrics

I have an app displaying content-cards with text in front of a background-image. For better readability a blur-layer is added between text and background-image. As it is not easy with flutter to get the height of a widget (or text) before it is…
Rafa2602
  • 423
  • 4
  • 12
3
votes
2 answers

How to get the text width of a string in ExtPascal

I am trying to position buttons (TExtButton) using the ExtPascal library (wrappers round ExtJS) in Lazarus. I want to set the width of the buttons based on the text and font of the button. I have tried various combinations of GetWidth and…
Mark Patterson
  • 417
  • 2
  • 6
  • 15
2
votes
0 answers

Vim: how to insert a character like '\' automatically when auto wrap a line?

Suppose I :set tw=5, when wrapping the following 'long' line: a = b + c It becomes: a = b + c Yet I want it to be: a = b \ + c Or even better if a smart indent is inserted on the next line, like this: a = b \ + c How do I do that?
ghostli123
  • 21
  • 2
2
votes
1 answer

Setup Vim to cut fold line after 80 characters

In my .vimrc file I have textwidth=80 and a white line indicating 80 characters per line limit. Now, as I am also using folds, is there any way to cut fold lines to 80 characters. Right now a fragment of C file in my setup looks like this:
syntagma
  • 23,346
  • 16
  • 78
  • 134
2
votes
1 answer

How do I limit the minimum and maximum width of an element?

I have a line of text that I want to draw borders around. At the moment, the markup looks like this:
Really really long long long title name
The style looks like this: …
Son of the Wai-Pan
  • 12,371
  • 16
  • 46
  • 55
1
vote
1 answer

textWidth() function doesn't appear to be working properly in Processing Java

Attempt at making a UI Library Hi there, I am making a UI Library as I had some free time I've added a button which functions Then I tried to add a Text Box, for which I needed to add a blinking cursor The cursor animates properly but the problem is…
HAXBABA
  • 11
  • 2
1
vote
1 answer

Can I allow inline-block elements to split across lines?

I'd like to have links zoom in when the mouse hovers on them, I've tried with transform unsuccessfully, but then I found this answer, which looked promising. However, making an inline element an inline-block also seems to prevent it from being split…
Enlico
  • 23,259
  • 6
  • 48
  • 102
1
vote
3 answers

Delphi Printer.Canvas.TextWidth property

I'm trying to set the column width for printing with my Delphi application. Whatever I type for the string doesn't make the width fewer. Actually I don't understand why the property returns a string, it should return width in pixels. My code…
nikel
  • 653
  • 4
  • 13
  • 24
1
2 3