Google fonts issue - html

Here is the font that I want to use https://www.google.com/get/noto/#/family/noto-sans
I don't want to download this and use. I want to use it directly from google webfonts.
But when I try to use it from this page https://www.google.com/fonts#UsePlace:use/Collection:Noto+Sans getting issue in utf characters. In fact on first link I can see language between available languages.
This is example of first link on my language:
And here is what I get when I use it from second link (web fonts):
http://cdn.joxi.ru/uploads/prod/2014/08/10/c13/5d9/24da6d7596f2129a32dda1c561e7545b2fdafe9c.jpg
As you see the character ə looks different in results. How to get Noto Sans for specific language from google webfonts?

When you visit https://www.google.com/fonts#UsePlace:use/Collection:Noto+Sans, go to the second step and select the character sets that you want to include for your language.

Related

Use specific glyph name with no Unicode value in HTML?

How can I use for example the glyph name "rcaron.terminal" which has no Unicode value in HTML? or any other such case? Is it even possible? I think it must be surely but I got no clue. It's easy for regular letters like the glyph "ß" where I would just type "&#xDF" and get that character or "&#223" (same result) but for glyphs without any Unicode value I don't know what I'm supposed to do...? I've tried also "&rcaron.terminal" but nothing, where as something like "&hearts" would work giving a heart glyph of god knows what font, probably Arial I dunno.
Do I need to use state some specific encoding aside from ANSI in my html document?
ie. < meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-8" > or something... like Im really lost lol
All I found on the net was this http://text-symbols.com/html/unicode/ but I cant find any more info so I came here.
Please help! Thanks! :)
There are no glyphs in HTML which do not have a Unicode name.
If you really need to have a glyph which is not representable using regular Unicode, you might want to create a font of your own and define the glyphs you need in the private use area; but obviously, then, your HTML will be impossible to use without that particular font.
Background links:
http://arstechnica.com/information-technology/2008/10/embedded-web-fonts/
http://www.font-face.com/
Practical guides:
http://blog.fogcreek.com/trello-uses-an-icon-font-and-so-can-you/
http://blogs.atlassian.com/2013/07/how-to-make-an-icon-font-the-8-step-guide/
First navigate to this site: https://fontdrop.info/#/?darkmode=true
Upload the file with your font
Click on the Ligatures tab.
Every Glyph should have a Components field
copy the components for the character you want to use
paste that string into HTML
You don't need any & or #, it just detects the string and converts it.

Retrieve first paragraph from Wikipedia in Chinese

I want to retrieve the first paragraph of Wikipedia in Chinese language. I found an API;
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&rawcontinue=1&format=xml&exintro=&titles=samsung
but it returns data in English.
How can I get data from this API in Chinese language?
Wikipedia is not one site but multiple. The article Samsung on English Wikipedia contains no Chinese text, but you are probably looking for the corresponding page on Chinese Wikipedia. As most or all Wikipedias use the TextExtract extension that you are calling above, you can simply change the domain and page title, and use the same API call as you just did:
http://zh.wikipedia.org/w/api.php?action=query&prop=extracts&rawcontinue=1&format=xml&exintro=&titles=%E4%B8%89%E6%98%9F%E9%9B%86%E5%9B%A2
Relevant for Chinese: According to the docs, you should also be able to chose what language variant (e.g. zh-tw, Taiwanese, or zh-cn, mainland) to fetch, using the exvariant parameter.

How to convert MS Outlook smiley (Wingdings) to something displayable in a browser?

In the noble effort to re-invent every wheel, our company has recently rolled our own custom web-based e-mail app, of which I was the primary designer.
One thing I've noticed is that smileys coming in from MS Outlook-based e-mails (sent from third parties) are not appearing correctly. Example: A happy face just displays a J
The HTML of the inbound message comes in like this:
<span style="...;font-family:Wingdings;...">J</span>
I know that Firefox and Chrome do not support the Wingdings font because it is non-standard. However, I am tasked with coming up with a fix.
Is there a good way to either 1) force the browser to load and use Wingdings or 2) otherwise convert the J to a smiley?
I'd rather not do anything crazy like try some wingdings-detection-regex - or even worse, parse the DOM - just to get some stupid emoticons working. Maybe there is already some library out there that already handles this?
For what it's worth, GMail seems to not 'fix' this problem either. iOS doesn't in the message view, but puzzlingly does fix it in the inbox view (replaces the J w/ emoji)
EDIT
To clarify, this question is regarding inbound messages from third parties. Outlook, by default, autocorrects ":)" to the Wingdings smiley. There's nothing I can do to prevent this coming in. What I need is a solution to correct for this.
EDIT 2
Again, the app itself is a web based e-mail client (Gmail, etc.). E-mails go in to here, NOT to users' individual Outlook/phones/other e-mail clients. It only goes into the web app.
To avoid having to parse the HTML or manipulating the DOM, a simple solution would be to use CSS3 web fonts by linking the Wingdings font-family to a copy of the Wingdings font file on your server:
<style>
#font-face {
font-family: Wingdings;
src: url(link_to_wingdings_font_file.ttf);
}
</style>
However, a license is required for this approach.
You could embed the SWEC (Symbola-based Wingdings Emoticons Compatibility) font: https://drive.google.com/open?id=0BwDrnPQfa-aMOEx0bEZCQUNrSGs
It provides basic compatibility with Wingdings emoticons. (In Wingdings, "J" represents a smile, "K" represents a lack of expression, and "L" represents a frown.) Background: certain versions of Microsoft e-mail clients still in use change user-typed expressions such as ":)", ":|", and ":(" into "J", "K", and "L", respectively, and then specify Wingdings as the font family; recipients on systems which do not include a Wingdings-compatible font are not able to see the intended emoticons, which can cause confusion.
You need to manually substitute it prior to sending the email as you have no control over what fonts the reader has installed. You also can't include anything outside bland old html and css (unless you want to mess with VML)
First I would try running your wingding through a html converter to see if there is a html code for it.
Besides that, you could try a webfont wingdings equivalent, however there are issues with Outlook playing nice when webfonts are imported in email (ignores your font stack, falling back to Times New Roman).
Besides that, all that is left is ZephyrusDigital's suggestions of using an image or :).
Against my better judgement I have decided to go for the quick hack and just use a regular expression. Here it is for anyone else that runs into the same problem:
$html = preg_replace('/\<SPAN*?(Wingdings)*?[^\>]*\>J(\<o\:p\>\<\/o\:p\>)*\<\/SPAN\>/i', ' :) ', $html);
use :)
kidding!
why not save the wingdings smiley in photoshop as a png, or make another custom one? you could use <img src="http://something.com/images/smiley.png" style="display:inline-block;"/> and it won't look weird in a text block as long as it isn't taller than your line-height.

Displaying UTF-8 codes from JSON file as Emoticons

I am loading a JSON file that contains some UTF-8 codes, that represent emoticons.
The JSON content looks as follows:
"Studying! \uf4d6"
"Winning \uf40e\uf3c1 #4mile"
"Cheer me on \uf603 #werunamsterdam"
These UTF-8 codes are displayed as blocks in the browser. But when I look at this Unicode reference in Firefox, the codes are actually recognized!
(for example, UF4D6 is a book)
How do I convert the code from my json so that a browser can display them?
The code points from \uE000 to \uF8FF are in a private use area, so there aren't any standard glyphs associated with them.
You can, however, create your own font with suitable icons at these code points. This can be done quite easily using online tools like IcoMoon. Alternatively, use a string replacement routine to swap these characters with suitable markup (e.g., replace \uf4d6 with <img src="/icons/book.png" alt="[Book]" />)
These emoticons are encoded as regular characters as defined in Unicode, i.e. they're no different from the letter "A" or "%". All you need is a font that has glyphs for these "characters". Since not everyone can be expected to have such fonts installed (apparently you don't), if you want maximum compatibility, there are libraries for most languages that replace these characters with equivalent images. Google for one that suits your needs.

Custom Google search url that excludes certain sites

I am a doctor and frequently search for colleagues. I am almost never a potential patient looking to make an appointment. The least useful results to me are those from vitals.com and healthgrades.com. However, occasionally I need them. So the obvious thing to do is append -site:healthgrades.com -site:vitals.com to each google search I do looking for a particular doctor. How do I code that in a url? If I know the URL then I could make a custom search in my browser and call it up with a nice short keyword.
I looked at Google Custom Search but that insists on starting with some particular sites. I want to search the whole internet but exclude just two sites.
I have used Google Custom Search to achieve this. Set up your custom search engine, then go into the "Sites" settings and add the top level domains (*.com, *.org, etc.) to the "Included sites" section. Add whatever sites you wish to skip in the "Excluded sites" section. Good to go!
Here's a screen shot of my setup
Google states that:
Adding "top-level domains" such as '.com', '.travel/*' is not
permitted in Google site search.
(http://support.google.com/customsearch/bin/answer.py?hl=en&answer=71826)
but I have not had any issues doing so - not sure if this may change in the future but it seems to work at present!
I had the same problem, so here is how I changed Chrome's Google search settings (copied original search URL and created new search type in search engines settings):
{google:baseURL}search?q=-site%3Avitals.com%2B-site%3A%2Bhealthgrades.com%20%s&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:iOSSearchLanguage}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}{google:contextualSearchVersion}ie={inputEncoding}
The other problem I got is duplicate results like for "Primary care physician in 60654" page in search results.
Google search results example for the query
Sometimes google returns multiple pages from one domain, which I don't like, but could influence on this only by additional javascript :)