Can't get special characters to render using Open Sans font?
I have a UWP app with a text block that renders the alpha character using the Open Sans font. But the correct character is not rendered the unsupported character is...
Any ideas on how to get a UWP apps text block to render the correct font?
When I install the font into my Windows 10 machine the font renders correctly in notepad but not in my UWP app which references the same font family.
I know my UWP is rendering the correct font because I can see the difference between the don't and the default font.. The normal alpha numeric characters are rendering correctly.
Any ideas?
uwp
add a comment |
I have a UWP app with a text block that renders the alpha character using the Open Sans font. But the correct character is not rendered the unsupported character is...
Any ideas on how to get a UWP apps text block to render the correct font?
When I install the font into my Windows 10 machine the font renders correctly in notepad but not in my UWP app which references the same font family.
I know my UWP is rendering the correct font because I can see the difference between the don't and the default font.. The normal alpha numeric characters are rendering correctly.
Any ideas?
uwp
1
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26
add a comment |
I have a UWP app with a text block that renders the alpha character using the Open Sans font. But the correct character is not rendered the unsupported character is...
Any ideas on how to get a UWP apps text block to render the correct font?
When I install the font into my Windows 10 machine the font renders correctly in notepad but not in my UWP app which references the same font family.
I know my UWP is rendering the correct font because I can see the difference between the don't and the default font.. The normal alpha numeric characters are rendering correctly.
Any ideas?
uwp
I have a UWP app with a text block that renders the alpha character using the Open Sans font. But the correct character is not rendered the unsupported character is...
Any ideas on how to get a UWP apps text block to render the correct font?
When I install the font into my Windows 10 machine the font renders correctly in notepad but not in my UWP app which references the same font family.
I know my UWP is rendering the correct font because I can see the difference between the don't and the default font.. The normal alpha numeric characters are rendering correctly.
Any ideas?
uwp
uwp
asked Nov 13 at 16:56
visc
1,00211433
1,00211433
1
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26
add a comment |
1
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26
1
1
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26
add a comment |
1 Answer
1
active
oldest
votes
I’m not sure how you render the Open Sans font in your UWP app, I recommend you add the custom font file(.ttf or etc.) into the Assets folder, then set the font with FontFamily property:
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Bold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Bold Style"/>
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-BoldItalic.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-BoldItalic Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-ExtraBold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-ExtraBold Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Light.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Light Style" />
The FontFamily format is like [FontFilePath]#[FontName], note that the FontName must be “Open Sans” in my test.
You also can set it in the code behind like:
MyTextBlock.FontFamily = new FontFamily("/Assets/OpenSans-Light.ttf#Open Sans");
--------------Edit---------------------------------------------------------
Please provide some code and screenshots for more details, am I misunderstand something here? What specific character does not work here? Do you mean something like "β" which is not working?
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285975%2fcant-get-special-characters-to-render-using-open-sans-font%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I’m not sure how you render the Open Sans font in your UWP app, I recommend you add the custom font file(.ttf or etc.) into the Assets folder, then set the font with FontFamily property:
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Bold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Bold Style"/>
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-BoldItalic.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-BoldItalic Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-ExtraBold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-ExtraBold Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Light.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Light Style" />
The FontFamily format is like [FontFilePath]#[FontName], note that the FontName must be “Open Sans” in my test.
You also can set it in the code behind like:
MyTextBlock.FontFamily = new FontFamily("/Assets/OpenSans-Light.ttf#Open Sans");
--------------Edit---------------------------------------------------------
Please provide some code and screenshots for more details, am I misunderstand something here? What specific character does not work here? Do you mean something like "β" which is not working?
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
add a comment |
I’m not sure how you render the Open Sans font in your UWP app, I recommend you add the custom font file(.ttf or etc.) into the Assets folder, then set the font with FontFamily property:
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Bold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Bold Style"/>
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-BoldItalic.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-BoldItalic Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-ExtraBold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-ExtraBold Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Light.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Light Style" />
The FontFamily format is like [FontFilePath]#[FontName], note that the FontName must be “Open Sans” in my test.
You also can set it in the code behind like:
MyTextBlock.FontFamily = new FontFamily("/Assets/OpenSans-Light.ttf#Open Sans");
--------------Edit---------------------------------------------------------
Please provide some code and screenshots for more details, am I misunderstand something here? What specific character does not work here? Do you mean something like "β" which is not working?
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
add a comment |
I’m not sure how you render the Open Sans font in your UWP app, I recommend you add the custom font file(.ttf or etc.) into the Assets folder, then set the font with FontFamily property:
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Bold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Bold Style"/>
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-BoldItalic.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-BoldItalic Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-ExtraBold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-ExtraBold Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Light.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Light Style" />
The FontFamily format is like [FontFilePath]#[FontName], note that the FontName must be “Open Sans” in my test.
You also can set it in the code behind like:
MyTextBlock.FontFamily = new FontFamily("/Assets/OpenSans-Light.ttf#Open Sans");
--------------Edit---------------------------------------------------------
Please provide some code and screenshots for more details, am I misunderstand something here? What specific character does not work here? Do you mean something like "β" which is not working?
I’m not sure how you render the Open Sans font in your UWP app, I recommend you add the custom font file(.ttf or etc.) into the Assets folder, then set the font with FontFamily property:
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Bold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Bold Style"/>
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-BoldItalic.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-BoldItalic Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-ExtraBold.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-ExtraBold Style" />
<TextBlock
FontFamily="ms-appx:///Assets/OpenSans-Light.ttf#Open Sans"
FontSize="36"
Text="Hello, this is OpenSans-Light Style" />
The FontFamily format is like [FontFilePath]#[FontName], note that the FontName must be “Open Sans” in my test.
You also can set it in the code behind like:
MyTextBlock.FontFamily = new FontFamily("/Assets/OpenSans-Light.ttf#Open Sans");
--------------Edit---------------------------------------------------------
Please provide some code and screenshots for more details, am I misunderstand something here? What specific character does not work here? Do you mean something like "β" which is not working?
edited Nov 16 at 8:13
answered Nov 15 at 9:31
Barry Wang - MSFT
768139
768139
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
add a comment |
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
yeah I'm doing this ;) but it doesn't render special characters
– visc
Nov 15 at 16:01
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
@visc I have some edit in the answer. Can you check whether my understanding is right here?
– Barry Wang - MSFT
Nov 22 at 1:43
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285975%2fcant-get-special-characters-to-render-using-open-sans-font%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Hm, a line of code to reproduce this issue would be very useful to the people who are willing to help you.
– DK.
Nov 13 at 17:58
You would need to use converter on your text block and return the new font that you need in your converter, which may fix your issue
– Venkat
Nov 13 at 19:26