How to write text inside an oval shape in Microsoft Word - ms-word

I want to write a text inside oval shape and also want that text should also adapt that shape using Microsoft Word (because I only have Microsoft Word).
I am elaborating my question using this image:

I just added a label above the shape, and changed it's BackColor to the shape color, AutoSize to False,TextAlign to MiddleCenter and resized the label inside of the shape so the Text will fit on the shape.
But make sure you won't add text that has a length more than the shape width, because it will get ugly!

Related

Apply color to text with material color

Using TextMeshPro, I would need to apply color to a specific section of the text but at the same time the default text has material color applied.
string text = "Here is default text with brown text\u003Ccolor=#4186FC>Blue text here\u003C/color>"
The problem is that the final result is the multiplication of both color and then the blue part resolves as almost black. If material color is white then no problem.
Would there be a way to cancel the material on this part without making two different text objects?
You are going to want to use Rich Text. For your example you'd want to use the <color> tag. Here's how it would look
string text = "Here is default text with brown <color=#4186F>Blue text here</color>"
There's a bunch of other parts of the text you can change in the same text field using these tags, so be sure to read into the link.

Swift String DrawInRect top margin

I'm trying to layout some text that is being exported as a PDF.
I'm using drawInRect(rect, withAttributes) to draw the strings, however, I'm getting a gap between the top of the rectangle the text is being drawn in, and the actual text.
Here's a screenshot, with the bounding rects stroke in red
the goal is to have the 2 "1." be top aligned, but because of that gap I can't figure out how to do that...
Thanks!

Setting color of padding for GtkAlignment

I have a GtkTextView inside a GtkAlignment, which I'm using to add top/bottom padding to the text view:
GtkAlignment
top-padding: 5
bottom-padding: 5
child: GtkTextView
Right now it looks like this:
So, it works, but the padding is gray and I want it to be white (ideally I want it to be “the color of the text view” in case the user has a custom theme, but white would do as well). Is there any way to do it?

Cairo graphics: Engrave a text in a figure and also making it transparently

I have a question regarding Cairo codings (http://cairographics.org/).
I have a filled rectangle (cairo_fill (cr)), how can I cut a hole in the middle of it representing for example the letter "S"?
So basically, I want to "engrave" text in that rectangle but also making the text transparent (like cutting a hole in the rectangle).
Anyone have any tips?
Set the fill rule to even-odd and use cairo_text_path() to get the shape of the letter "S", then cairo_fill() as you do now.

UITextView wrap text with cornerRadius?

Is it possible to make the UITextView wrap its text within the cornerradius of the layer? If I have a textview with cornerradius half of the width, it makes a circle. If I want to display text in that circle, I would loose a lot of the text outside the circle.
It would be possible to achieve the desired effect, but not with a single UITextView, and it wouldn't be easy. The word wrapping would have to be manual, segmenting the string into a series of UILabels that fit within the circle. Perhaps you should reconsider the design - does reading a paragraph bounded by a circle really make sense?