Display UTF8 text with accents in AFRAME like á í ñ - aframe

When I try to use some spanish words in my interface of AFRAME project all characters with accent disapear:
<a-text id="menu-desc" value="Menú"
position="-0.18 -0.06 0.1"
height="1" width="1"
align="left" anchor="left"
baseline="bottom" ></a-text>
just display "Men" instead "Menú".
In the html page I try to add:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
with no effect. ¿how to display correctly that kind of characters?

I can't mark this as a duplicate, so i'll paste my anwser from here:
It's not as simple as adding the meta type, since a-text is not just displaying characters, it's rendering them in the engine.
So there are three ways I can think of:
1) The proper way: find or generate a font from a fontset containing those characters. The docs describe how to use custom fonts:
<a-entity text="text: Hello World; font: ../fonts/CustomFnt.fnt;
fontImage: ../fonts/CustomFnt.png"></a-entity>
But you need to have a font file + a .png grid with the font images.
The docs provide a link to a tool for generating fonts, as well as a tutorial.
2) check out Don McCurdy's custom font generator !
3) The workaround: You could make a transparent image containing Your text and put it on an <a-plane>, like I did here.

Related

Is there a way to add CSS to a title element in a SVG file?

I am working on an SVG file that has a number of <path> tags. I also have a <title> tag for each of these <path> tags. I have text inside the <title> tag such that when I hover over the <path> element, it displays the text. However, the text is the default format, bland text with an ugly looking border box etc.
Is there a way where I can use CSS to modify the <title> tag so that it can look better?
This is what I have thus far:
<title>
Title Tag!!!
</title>
<path d="M696.393,-204.269C703.418,-219.592 708.202,-238.899 697,-252 671.205,-282.169 562.896,-290.806 492.399,-293.194" fill="none" stroke="green" stroke-width="3"></path>
Unfortunately this is browser element and you cannot style it.
If that helps you could make custom tooltip by yourself, look for example here.
Making custom tooltip will probably require some amendments in your code though.

Vaadin Icons Svg Unicode value is a string literal

I am trying to use Vaadin Icons in our Vaadin application. I have the Vaadin-Icons.svg file. I want to use the angle-right icon but I find that the svg file has a string literal as unicode value. It looks like this
<glyph unicode="angle-right" d="M256 128h128l320 320-320 320h-128l320-320z" data-tags="angle-right" />
while i was expecting something like this
<glyph unicode="" d="M550.4 736l224-224h-774.4v-128h774.4l-224-224 89.6-89.6 384 377.6-384 377.6z" data-tags="arrow-right" />
How do I use it in the css file?
The unicode value works as a ligature. Not sure, but maybe you are looking for the font icon instead, which you can more easily use from CSS? SVG’s are more useful when used within HTML.

I am having trouble adding HTML5 (background colours and colours) to my website within the WordPress editor

Here is a list of the research that I have done. First I looked how to do it on the internet and I found this site.
Then I asked a friend and he suggested that I do this with the code, and as an example, gave this:
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
so in HTML
<h1 class"best-header-ever"> Header </h1>
then in CSS
.best-header-ever {
color: blue;}
I don't know if he was doing it in the right order so the above, is the most information I have of an alternative strategy
Now I am working on this, again in the WordPress editor:
.best-header-ever{color: blue;}
<header> header
link rel="stylesheet" type=text/css href=styles.css
[header/]
(this text to the left was part of the website-->)This is a contact page with some basic contact information and a contact form.
[contact-form]<span id="mce_SELREST_start" style="overflow:hidden;line-
height:0;"></span>[contact-field label="Name" type="name" required="1"/]
[contact-field label="<span id="mce_SELREST_start"
style="overflow:hidden;line-height:0;"></span> Email" type="email"
required="1"/][contact-field label="Website" type="url"/][contact-field
label="Comment" type="textarea" required="1"/][/contact-form]
body/
I don't know what I'm doing wrong and I would like to add background colour to the font and text. Oh, I have also been working on freecodecamp.org as research.
I am trying to learn how to do this work without the security net of freecodecamp to improve my skills.
Also, I don't know if I can even add HTML5 to HTML (everything from contact form to /contact form was being registered by the computer, but when I added any other characters, no background colours or colours would display).
This is what the page looks like:
myedit_pic
I don't know if this makes a difference, but the WordPress editor has buttons:
wordpress-editor-interface
I suggest you use background-color: instead of color:. Color will just change the text color, or the color of the words inside that header. Using background-color will change the background color.
First to answer your initial question:
When you assign a class in HTML, make sure to put an equals sign between 'class' and the name of the class in quotes:
This:
<h1 class"best-header-ever"> Header </h1>
Becomes:
<h1 class="best-header-ever"> Header </h1>
Also, to address your issue about how to learn and test your code, I suggest using something like jsfiddle.net. You can test HTML, CSS, and Javascript (when you are ready for that) and see the results live.

css not displayed correctly

I have the css made by one web designer, and that css file contains classes like :
.icon-phone-alt:before {
content: "\e064";
}
and in my view page i have something like :
<span class="icon-phone-alt"></span> Tel.: (+40 21) XXXXXXXX<br />
The problem is that instead of something like this :
i get this:
I have to mention that my browser is configured to utf8 and the original html page is displayed correctly with the same browser. I think that this has something to do with character encoding but i do not know how to handle the situation.
You have to use special font for icon span which displays icons as characters. For example:
<link rel="stylesheet" href="http://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css">
<span class="icon-phone"></span> Tel.: (+40 21) XXXXXXXX<br />
Maybe you have not included your Glyphicons/special fonts.
You should include them first. Try to look at this implementation:
https://github.com/mdo/bsu/blob/master/step-4/bootstrap-less/glyphicons.less

Google Conversion Code HTML5

Google Adword Conversion code create one image with width="1" and height="1" they make a big white line my HTML.
What should I do?
They create image like
my Code is HTML5.
Set display to none in your style sheet

Resources