I want to use a pixel font on the web. I'm including it using @font-face however all the browsers are applying anti-aliasing to the font. I can't seem to find a CSS rule to disable this, can anyone think of another method of disabling anti-aliasing?
Font rendering is done by the operating system and browser, so, as of yet, I believe there is little that you can do with CSS. There may be some proposed CSS rules in discussion (I've seen mention "font-smooth" or something like that), but nothing in CSS3, as far as I know, and definitely nothing in CSS2.
Yet it seems to be a bit hacky to disable anti-aliasing with filter. By the way it does not cause to completely disable anti-aliasing just causes it to be applied somehow differently so bitmap fonts render correctly. On the other hand it breaks rendering of non-bitmap fonts.
As of 2022, all of these answers are broken except for the SVG one, and in that one's case you get inconsistent scaling when working with smaller sizes (Like, 24 and below...yeah, it's useful for very large headings). font-smooth is an option indeed, but it shouldn't be your first because it's actually -webkit-font-smoothing/-moz-osx-font-smoothing, and as the latter would imply, neither work on anything other then Mac OS X.
I have seen things such as 98.css use custom fonts that have characters constructed with boxes, which doesn't solve the problem but mitigate it. This is a VERY tedious process to do, though, and while this works fine for MS Sans Serif, it fails for more packed fonts and/or fonts at smaller sizes.
Your best option is to create images for any texts you want to be sharp. On that note, I created a program that converts PNGs to SVGs without tracing, which is a solution to let pixel perfect images be displayed properly on larger, 1440p monitors.
I want to use an 8-bit-style pixel font. There are quite a few available online as TTF, e.g. this one. I can load this with createFont however the type is displaying anti-aliased - I wanted it to display aliased and pixel-for-pixel compared to the original font. I tried creating a VLW but not sure what size to set.
In my experience with pixel fonts as TTF there is a specific point size you are meant to set it at to get the character pixels to show as intended (8x8 tiles), sometimes the font creator provides this info. E.g., you set the font at 10pt, and that gives you 8x8 sharp characters.
From Pango.FontMetrics there is pango_font_metrics_get_ascent and pango_font_metrics_get_descent. So with some math we should be able to adjust our
pango_font_description_from_string() to get the desired size.
I think, for pixel based layout, we have to use PangoLayout (Pango.Layout) because Pango is mostly Point based (1 point is 1/72 inch). Mr Clasen told you already that for example pango_font_metrics_get_height() uses point, not pixel as unit. PangoLayout functions like Pango.Layout.get_pixel_extents gives us sizes in pixels, which we can use to position text. I think my own apps like -chess or do it that way, but I can not remember details.
I've started by checking out dafont's bitmap fonts, but it takes quite a while to test all of them. I've played with a few and I'm surprised to see only a few work well when set to a small size (7px max height). I was hoping someone might have had a chance to play with more and recommend them.
Apple and Microsoft have always disagreed in how to display fonts on computer displays. Today, both companies are using sub-pixel rendering to coax sharper-looking fonts out of typical low resolution screens. Where they differ is in philosophy.
I was wondering what format Storyline is using for font-size : pixel or point? I noticed that the text put in Storyline is much bigger than in Flash or even Word. For example, I can stack up to 8 lines of text to fill a vertical space of 112px, but in Storyline, that gap is filled with only 5 lines of text. (I've made sure that both are using the same font, font-size, line spacing, margin, etc.)
This bundle contains a collection of 20 public domain fonts that you can use, modify, and distribute in personal and commercial projects. It's the spiritual successor of the 'magos free pixel font bundle' released some years ago.
I wrote a similar set of fonts for my Canon 5D project. mkfont parses the fonts into packed 8, 16 or 32-bit wide rows. At the time I didn't have a multiply instruction, so there is some funky math going on in the display routines.
Amazon QuickSight introduces pixel-based font sizing for Textbox, a departure from the fixed font sizes ranging from small to X-large. This enhancement empowers authors with unmatched precision, allowing them to finely adjust font sizes based on numeric or pixel values ("14px" or "32px"), granting greater flexibility. Along with this we are also adding text highlighting capabilities, similar to that of Insights visual. You can highlight text to emphasis key data points and insights making it easier to drive user attention precisely where you want it, making your data-driven narratives even more compelling. For more details refer here.
The enhanced Textbox with pixel based font size and text highlighting is now available in Amazon QuickSight Standard and Enterprise Editions in all QuickSight regions - US East (Ohio and N. Virginia), US West (Oregon), Asia Pacific (Mumbai, Seoul, Singapore, Sydney and Tokyo), Canada (Central), Europe (Frankfurt, Ireland and London), South America (São Paulo) and AWS GovCloud (US-West).
An experiment with making a font using only a 3x6 grid. It was supposed to look curved and smooth rather than straight - I'll do a straight one another time. What can I change here? If you have any suggestions, please let me know!
Sorry if I have come to the wrong group. I am searching for information on why a font would work with some code that already exists and what if the best way to visualise this. Tried a number of softwares and sites but none provide the array that I'm looking for.
Thank you. The .h file and the other link shows that the font information work with existing code. I was researching what the next sizes would be and how I can use the array to test the font or a software will provide an array as shown in the .jp site.
I've made an 8x8 handwriting style pixel font! A few people online liked the text I'd used in my games, so I spent an afternoon making it into a proper TTF file. In the process of making it, I ended up making a bunch of new characters for the font that I didn't even know were missing and repairing some of the existing ones to have a matching line height.
I've created a hack n slash/action/casual game in my spare time called Medieval Chaos using some of these fonts and I just released it on Google Play (for now Android only, but iOS is on the way :) ). The idea is to keep it as an indie game that I will always evolve with new features. I hope you like it, but all feedback is welcome. Follow the link: =org.mileoio.medieval_chaos
I just used this font pack in a recent project of mine and wanted to let you know: Don't Get Catfished! by Jorddagreatest (itch.io)
Thank you for putting this font pack out there. I love it! :)
I only edited the lower case letters (in Unity, using TextMeshPro's font asset settings) but I found a lot of them would have uneven spacing leading. It's very apparent around much of the punctuation and thin letters such as "i" or "l".
When creating a new Canvas Page the default font size is set at 20 pixels. Default heading level sizes are also set in pixels. Yet, when changing the size of text the only options are points. This is aggravating because it causes extra work in order to ensure consistency in font sizes throughout the content of Canvas pages. For instance, it would be great to have the option to set font sizes as pixels without diving into into the html to do so. See my video for a visual of what I am talking about.
Well, I have been working with one of our IT people and they experimented with the issue. I opened Canvas in Firefox (Chrome is my go-to) and the default was 12pt. So he did more digging and was able to replicate the problem in chrome. I had increased the size of my fonts in chrome and that impacted Canvas. The snapshot of the settings is attached. I changed the setting and everything is back to normal. Thanks for working on this with me. Hopefully other people will benefit from this thread.
Really quick on font sizes, from what I see on my end, if you don't change anything related to font size in pages, the default font size is 16px/12pt. Maybe your video will explain what you're seeing more once we can view it.
I'm not running a desktop environment and I am using Openbox as my window manager. Currently, chromium doesn't use sub-pixel rendering on its fonts though I'm finding that firefox and openbox do display fonts using sub-pixel rendering despite the aforementioned symlink.
So the plot thickens. I have two machines, with apparently identical fontconfig settings. I have made sure that no per-user fontconfig settings exist on either machine. I have also erased and rebuilt the fontconfig cache as both my regular user id as well as root in case that is affecting things.
I can confirm that adding the Xft.* resources to my .Xdefaults and setting Xft.rgb to "none" does seem to disable the sub-pixel rendering. It appears that this overrides anything defined via fontconfig but the underlying mystery remains.
df19127ead