I am using ubuntu font in my web pages. But, when I am accessing the pages from different PC, the font does not appear good. what I should do? A constraint is there: I can't use internet for accessing the font,like googlefonts. One more thing, I have to consider IE8 also. Please, suggest some generic solution.
Related
I am new to ReactJS. I am trying to display all the font families in a dropdown, so that if i select one of the font family the text (displayed in a SVG) font-family will change.
I know in .net we can use System.Drawing.FontFamily.Families to get all the font familes. Like wise in react is there anything? Or else is there any other way to do this?
Thanks in advance...
You want to get all the available fonts on current machine, right?
I think there is no way to do that.
But with some trick we still can list almost available fonts on the current machine with:
1. A list of fonts
Windows fonts
Mac fonts
Some common fonts
2. JavaScript font detector
http://web.mit.edu/jmorzins/www/fonts.html
You got the idea, right? Now we just need to check what fonts are available in our font list and display them in the dropdown.
If you are building a web application using React, then it is impossible. For that matter, it is impossible with any library or framework. There is no JS API exposed by browsers that allow you get a list of all the fonts installed in the system (It can be a security issue).
However, if you are using React to build a Desktop application using electron.js or node-webkit.js, then you can export a binding for system API call to JavaScript and get this list. But it is a very cumbersome process. (I thought of this because you are comparing .net API with Web API.)
In general, as #Jared suggested, that is what most of the online(web applications) tools do when they want to provide font-selection dropdown for users.
Having a very annoying problem where custom user controls do not appear at all in my ASP.NET project when using IE8 and IIS6.
It works on all other browsers except IE8 when using ISS6.
When using exact same project on IE8 with ISS7, it works on all browsers including IE8.
Has anyone got any suggestions?
Is the content encapsulated in a certain tag, or included in a unique way (other language, etc.)?
I'm guessing there is a mime type or other configuration change between the two server instances, rather than it being a version conflict.
Why other browsers don't see the problem kind of hints away from that, but without additional details its hard to help more.
I am very pleased with the Web Developer Toolbar and Colorzilla add-on. I like how I can use those features to easily detect the HTML structure and colors used in web pages. But in my search for a good CSS font detection tool, I haven't come across anything that works in a similar way. Does anyone know of something out there that I have missed?
I use a tool called WhatFont for this purpose
It shows various information about the font used in each DOM element, such as font family, color, size and even where the #font-face files are served from. It is available in the form of a bookmarklet or a Chrome add-on.
This is very strange. I'm the main developer of www.inspirastudios.com.mx. I use cufon font replacement for the main navigation menu. I develop in Linux, so I use Internet Explorer in wine to test my site. The problem I'm getting is that cufon substitution is not working in my IE7 version. It works OK for other IE>7 versions and in any modern standard compliant browser. The strange thing is that, using some online testing sites, like http://ipinfo.info/netrenderer/ and http://browsershots.org the site looks OK, while in some others (like http://www.thumbalizr.com) it doesn't. What the hell is going on?
The issue with online testing sites is that you don't know how they're set up. I'm betting that some of those sites use IE7 straight, while others might be using IE8/9 with the render mode forced to IE7, or some other similar chicanery. Never trust those sites if you actually care about your results.
Now, on to the results of your personal testing. In IE-over-Wine, I've had a lot of weird stuff happen and I'm not convinced that it's truly comparable to actual Internet Explorer. This goes double if you're using IES4Linux or similar, because you (again) really have no idea what's been done to it to make it run. Always use a virtual machine (or actual Windows machine) if you possibly can.
I can confirm, though, that cufon appears to be functioning properly in IE7 as far as my copy of IE7 is concerned. :)
I am using HTML 5.
I have included following line to cufon code:
<script type="text/javascript">Cufon.replace('.mid_body h1');</script>
the <h1>tag doesn't get cufon font
but when I convert it to:
<script type="text/javascript">Cufon.replace('h1');</script>
it works!
I've been asked by a friend, who created a very visually appealing website mostly in Dreamweaver, to add some database backed functionality that I really only know how to do in ASP.NET. The problem is when I load his generated HTML into an ASPX page it renders it quite horribly. I've tried adding a basic .html page to an ASP.NET project but it still looks funky. He's on a Mac and i'm (obviously) using a Windows box. Is there a clean way to take a quite complete (but quite static) website and add ASP.NET functionality to it? Any comments are very much welcome. Thanks!
Just a quick thought.
You state in your comment:
Everything works is just doesn't look near as good as it did in the Safari browser
Where doesn't it look as good as it did in the Safari browser? When served as a page from a webserver (either the built-in cassini server, or IIS) in IE/Firefox, or when you switch to design view in Visual Studio?
Visual Studio has a lot of trouble rendering things correctly - it's really not standards compliant by anyone's definition - VS2010 is apparently much better - for example, try looking at this page: display/box/float/clear test in a browser and in the VS designer - very different.
If you mean in the browser, which browser? Have you tried looking at it Firefox instead? It's possible that if it's been built to look nice in Safari that it will work in Firefox, but there may be issues with the rendering/layouts in IE - this is a fairly well known issue.
If all the stylesheets are being correctly called (check with Firebug for Firefox for example) then there are probably some issues with the CSS that need to be addressed for IE.
ASP.NET does not alter the rendering of standard HTML. So there must be some other issue like a missing stylesheet (either all together or a broken link) or images. Once you have the HTML properly copied over and solve the display issue, you can add in the ASP.NET controls and code you need to make it functional.