Xamarin Forms FontIcon Upper Bitplane XAML Escape Character - xaml

I'm trying to use MaterialDesignIcons in a Xamarin Forms Shell app. The latest version of this font encodes all of the glyphs in the upper bit planes (see this old StackOverflow question about that).
The problem I have is that I don't know how to identify the proper XAML escape sequence for upper bit plane glyphs. For example, \uf30c in C# code translates to  in XAML. But I don't know how to translate an upper bit plane value (e.g. \U000f0706) to the correct XAML escape sequence.
I thought I'd just use a binding to code instead, but this is blocked by an open bug. There's a workaround in that GitHub issue, but it doesn't seem to work for a Tab Bar Icon (which is where I'm trying to use it).
TL;DR - how to I write \U000f0706 in XAML?

Related

Does a DCL Fonts Reference Exist?

I'm was going reviewing a few autolisp and dcl tutorials (afralisp & autolisp-exchange) to brush up on the dcl code. To cut to the question, I see that the text can be underlined by the mnemonic in afralisp and the & in autolisp-exchange.
Is there a better way to underline a string of characters?
Can a string be made bold, italicized, or strike-though with this
file type?
If the above is true, is there a reference webpage that has a list of fonts that can be used with the dcl file type?
This webpage may contain the solution, but I haven't seen how: AutoDesk.com
In short, you cannot arbitrarily change the GUI font face or style using standard DCL.
The ability to underline text is purely an exploit of the mnemonic property which allows DCL controls to be manipulated using keys on the keyboard which correspond to the underlined letters as opposed to using the mouse to click such controls.
Whilst DCL text has the is_bold property, this has never worked (and likely never will). One alternative is to feign bold text using the set_tile function in conjunction with an image tile; or you can use the fixed_width_font property, but, as the name implies, this will change the text to use a fixed width font (the exact font cannot be changed).
One other possibility is to display text using the vector_image function applied to an image tile, as I demonstrate in the 'About' dialog for my Incremental Numbering Suite application.

Incorrect Japanese font rendering inside NSControl object

I'm building a UI application in macOS with dynamic localization (meaning that it's possible to switch language while the application is running).
I've noticed that if the initial language is configured to Japanese, and I switch to English on-the-fly, the text on the controls is rendered ok.
However, on the opposite case, when the initial language is English and I switch to Japanese on-the-fly, the Japanese symbols on the text field come out a little bit enlarged. (see below drawings to emphasize the difference - the left snippet is the original rendering while the right one represents the enlarged version)
For any particular control, the language is changed by simply assigning the localized string (taken with help of NSLocalizedString function) to the stringValue property of the control.
These results appeared on all versions I've tested (both 10.13 and 10.12).
Perhaps anybody encountered similar results? how should I resolve them ?
So apparently the rendering problem is resolved if the Language is properly installed on your machine under Language and Regions -> Preferred Languages

Curve Texblock in XAML / W8.1 throughTemplate?

Is it possible to access the TextBlock Template to change the border and make it curved?
I tried editing the Template through Blend but with no success.
I'm trying to achieve something like this (couldn't get that given solution working):
Curve TextBlock in Windows 8
I'm trying to do this in C#/XAML - WINRT (Windows 8.1)
I don't think a TextBlock has a template you could modify. It's probably just some parameters used to tell DirectWrite what text to render and with what properties. The easiest way to solve it is when your text is constant to just break it apart into multiple single letter TextBlocks and lay them out on a path using Blend or Illustrator. If don't control what text can show up on the path - you'd have to code up the layout algorithm. Chris's link seems like a good place to start.
There isn't a clean way to do this directly in Xaml. Like Filip says, you can approach it by breaking the letters apart. That can work well for long sentences with small letters, but can be pretty chunky with large or connected letters. If you need smoother rendering then you can interop to Direct2D.
MSDN has a Direct2D animated text on a path sample which you could combine with the XAML SurfaceImageSource DirectX interop sample

Translating UI resources for Windows store apps

In XAML for strings that are to be displayed in localized language we need to identify its Width property and access it using x:Uid attribute.
If particular string width falls short of space how we can attain flexible layout and also we know German and Finnish require more space than English for text.
Is there any alternate way to get localized strings in XAML.
You can access the strings in code via a ResourceLoader object.

How to measure text in a RichTextBox in Silverlight

I want to get the height necessary to display the full text in my RichTextBox (when the text extends beyond the set height of the control).
Reminder: Silverlight has no handy TextRenderer.MeasureText like WPF does, nor any other apparent way to measure text.
Doesn't seem like there's any way to do this. I've seen mention of people measuring text of a single font (not mixed as in my RichTextBox) by creating a TextBlock and getting it's Width. Even this doesn't work - it's perfect for some fonts and inconsistent for others.
My app is occasionally connected, so I can't call the server.
As you say, I don't think there's a good way to do this in Silverlight today. There are some functions available in the Document Toolkit by First Floor Software, however those are geared towards working with XPS documents. I'm not sure what you're trying to do, however in Silverlight 5 the RichTextBox does come with the ability to "overflow" text into multiple other RichTextBoxes when the first one cannot display all of the data. This allows you to more easily create a multi-column text layout.
Document Toolkit: http://firstfloorsoftware.com/documenttoolkit
SL5 Video: http://www.silverlight.net/learn/videos/all/silverlight-5-multi-column-linked-text/
SL5 Blog Post: http://10rem.net/blog/2011/04/13/silverlight-5-advancements-in-text