Using custom font inside UserControl is making my font bold - ios

When I use my fonts outside of user controls I have them loading correctly. But when the word has accent and is inside UserControl the font is appearing in bold, I've tested more than one font and the problem happens.
In the image I inserted a sentence written on top of the whole frame in the same way as a sentence written inside a UserControl, what is outside proves that the accents work without being bold and inside shows that all the words that are accented are in bold.
The problem only happens on iOS.

I found the problem. I had edited some texts in another editor (VSCode) and also copied some others from another platform that we used, the problem happened due to the encode of these other tools, when pasting in VStudio it caused the problem.
Just rewriting the texts directly by VStudio and the problem has been fixed.

Related

How to use non-English characters in Godot?

I want to use non-English characters in Godot, but when I write them (In every node, like a Label or a Button) and run the project, the text does not display. For example, I write some Arabic characters in a Label and run the project, but I do not see anything. But I can see the characters in editor separately and reversely. ("عالم" is displayed "م ل ا ع")
I know that this problem is discussed on GitHub, but there was not any good solution. Please advise me a good and simple solution to solve this problem. I think it is not solved so far.
The default Label font in Godot doesn't support non-ASCII characters.
You can try to change the font in your Label node to one that supports non-ASCII symbols by picking a font from your computer, or if it doesn't exist on your device, uploading it from some site like Google Fonts, and choosing an arabic-supporting font, like Amiri.
After choosing the font for your Label node, open the Custom Fonts property in the editor of the node, and create a DynamicFont, and in Font => Font Data press Load and choose your font in the opened window in the file system (.ttf or any another font extension).

Supporting Drop Caps in Text Kit

I’m building an iOS reader app where I need to be able to highlight selections of text and optionally link notes with highlights. I’ve begun by using Text Kit (UITextView, NSAttributedString). I am targeting iOS 7, 8, and 9.
My problem is that I need to be able to support Drop Caps on certain paragraphs in the content. This means the first letter of a paragraph is the height of 2 lines of text and the first 2 lines of text appear beside it, then the remaining lines wrap under. My content has many drop cap characters on various paragraphs throughout.
Example showing 4-line drop cap.
Text Kit: Exclusion Paths
My initial assumption was that I would use Text Kit exclusion paths so that paragraph would wrap around it. But I can’t figure out a way to determine the exact placement of the exclusion paths and I wasn’t sure if these would float along as my content scrolls. With this approach, I would also have to manually handle text selection of the Drop Cap characters, which I’d like to avoid.
Text Kit: NSTextAttachments
I was hopeful that I could use inline Text Attachments (NSTextAttachment), but I can’t determine a way to have 2 lines wrap beside it.
Core Text
I found a couple older (pre-TextKit) examples of Drop Cap implementations using Core Text, however, every one showed only the first character of the content as a Drop Cap and not multiple paragraphs throughout the content as I need. I was hoping to avoid Core Text also since I’d rather not handle text selection manually.
https://stackoverflow.com/a/14469897
https://stackoverflow.com/a/14639864
https://stackoverflow.com/a/9272955
Current Hope/Question
NSTextAttachment feels like the simplest approach. Is there a way to wrap 2 lines of text beside it?
Fallback... I’m beginning to wonder if I should switch to WKWebView and drop iOS 7 -- since HTML supports drop caps and WKWebView provides more performance than UIWebView.

iTextSharp - Pre filled Chinese characters in PDF do not come visible until textfield is focused

I am creating PDF with pre filled values in Chinese but when opening the PDF all the textfields containing Chinese text are empty. When focusing a textfield the Chinese text comes visible but is hided again when unfocusing the field. What could be the issue?
Please share some more info, as there could be more than one reason why the appearances aren't generated by iText.
A. The first reason is explained in the StackOverflow question "AcroForm values missing after flattening". In this case, the PDF contains a parameter that instructs iText not to generate appearances, which would explain why you don't see any value up until you click the field, in which case the viewer will create them.
B. The second reason is explained in section 8.3.3 (entitled "Text fields and fonts") of my book. In this case, the parameter in the PDF doesn't prevent the creation of field appearances, but iText fails to do so because you're not providing a font that knows how to display the Chinese characters.
See for instance figure 8.3 and 8.4 of the book.
In figure 8.3, you see that Chinese text isn't displayed in the upper window. By fixing the form (using two different strategies), the Chinese text appears in the lower two windows. Note that the Chinese text won't appear in all viewers in the case of the middle window.
In figure 8.4, you see that Korean text isn't displayed in the upper window, nor in the third window. In all other windows, different strategies were used to fix this problem:
It would lead us too far to discuss all the different strategies in an answer on SO. Instead, please take a look at the TextFontFields example (for the C# version, please take a look at the ported examples). My guess is that you'll benefit most from the AddSubstitutionFont() method, provided that you use a font of which a subset will be embedded in the document (in the example arialuni.ttf is used).
In case of A., the phenomenon also concerns other languages. In case of B., the parameter is correct, but you're not providing a font that can be used to generate the appearance.

Special characters in Xcode look different in edit and view modes

I want to use a special character on an iOS button. When I insert it from special characters collection located in Edit/Special Characters menu it looks like this:
But after I exit the edit mode or run the app on device the character turns into this:
It looks like it uses different font. Is there a way to fix it?
Open up the character viewer (you may need to enable this in the Settings / Language)
You can inspect the arrows in here, and then check the font variations.
Once you've located the font you want, apply that to the label. I suspect you want Lucida Grande Bold.

Special characters not displaying, sifr r436

I followed the explanation on the sIFR wiki, but can't seem to get accented characters to display in my Flash movie. I opened up the Character Embedding palette, pasted "ÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ" into the "Include these characters" field after the ampersand, hit "OK", then re-exported the .SWF.
The characters still don't render in my sIFR file--any suggestions? I'm running r436.
have you tried checking the 'Basic Latin' or 'Latin I' boxes (just for sanity check?)
I've just looked through mine and I use 'Latin I'.
could be that the encoding between the webpage/javascript and flash isn't picking up the special chars - have you debugged your javascript to see what's being passed in?
[edit] what is the webpage encoding set to?[/edit]
Perhaps the font you're using just doesn't include those characters? Frequently, fonts will support just ascii.
As jeremy said, the major issue i've seen with sifr and charecters is that special charecters aren't part of the font you are using.
One way to test is run your current method with another standard font such as arial, if it works then it's probably down to your font.
What font is it?
Secondly when making the font glyphs inside flash you have to change the settings to include any foreign characters to insure they are within the font flash movie. most none standard characters are removed as it keeps the file size of the swf font file down.
Unicode escape sequences?
or maybe check a url encode chart
when you view the generated source (below) you'll see that the chars are being encoded by javascript...
content=This%2520is%2520an%2520embedding%2520test%253A%253Cbr%253E%25C3%25C4%25C5%25C6%25C7%25C8%25C9%25CA%25CB%25CC%25CD%25CE%25CF
can you switch on HTML on the text field to see if they show up?
Checking Latin I was mentioned, what about Latin Extended A, Extended B and Add'l? Cmd+clicking Punctuation, Basic Latin, plus all of the other Latin options may get you your missing characters.
I suspect its a problem with Flash. If I go to your example page (http://unstoppablerobotninja.com/demos/sifr-encode/), right-click on the Flash movie, and copy to the clipboard, this is the output:
This is an embedding test:
ÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
Did it work?
Which to me indicates that the characters are ending up just fine in the Flash movie, but they're not being rendered.
Can Flash render these characters if you use static publishing for some other Flash movie?
I have the same problem with a dynamic text field not rendering special characters, despite the field being set up correctly and the specific characters required being embedded in the field.
I noticed that HTML source text which is formatted to appear as Bold (i.e. using tags) creates this problem - the same text without Bold results in the special chars being rendered correctly (although obviously not in Bold :)
I tried various things including using the unicode reference and exporting the Bold variant of the font (Verdana) but nothing helps, so I think it's a Flash bug.
Of course, knowing this doesn't solve the problem if you need to use a Bold font, like I do - I'm still looking for solutions and will post back if I find something.
Good luck ;)
Solving the Bold issue is easy. Special characters not appearing is another problem entirely and one in which we are encountering currently.
Here's the deal with bold (and italic):
If you use bold or italic tags in the HTML, Flash has not necessarily embedded the bold and italic version of the font. What you have to do is create some hidden dynamic text fields that have the bold and italic versions of the font embedded. These hidden text fields can be placed in a frame past the end of the timeline so that they don't appear at runtime.
A related problem is when you click the B (for bold) in the properties panel and insert HTML text into the textfield without a <b> tag. Flash will embed the bold font into the SWF, but if you don't insert the <b> tag in your text, Flash will render it with a non-bold font (which won't appear because it wasn't embedded).
Unfortunately, we have a situation where a dynamic text field was created with one font, and if we change it to any other font, it doesn't render. Special characters, such as the ® symbol, don't render, even though they are embedded in the font.
This is with Flash CS3 and AS2.

Resources