Author

Topic: Custom fonts in BBCode using CSS (Read 1923 times)

legendary
Activity: 1512
Merit: 1036
September 16, 2014, 06:25:22 AM
#8
You can only specify fonts that have a high probability of being installed on the reader's operating system. It is nearly impossible to have a list of more that a few font faces that will present properly in OSX, Linux, Android, iPad, Blackberry, or whatever other browser the person may use in the future.

for example IOS font list: http://support.apple.com/kb/HT5484 includes many fonts not on other OSs.
Windows font list: http://www.microsoft.com/typography/fonts/product.aspx?pid=161
Fonts common to windows & mac: http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html

This is Apple's "didot bold", with a second font of "courier"

This is Ubuntu's "ubuntu" font, with a second font of "courier"

This is Window vista+ "Constantia" font, with a second font of "courier"

Chances are that two out of three of these look like a typewriter font, which is courier, demonstrating that you have to stick with basic stuff like Arial, Georgia, or even "san-serif".

You can specify a list fallback font faces in BBcode, but you would have to do research on what might be a similar looking preinstalled typeface across platforms. Here's an example that will be stylized but differently on each OS:
this is font=MarkerFelt-Thin, Droid Sans, Arial Black, san-serif

You can have colors though.

However, there is nothing that needs to be said that can't be said using your words.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 16, 2014, 05:12:59 AM
#7
Yes. No.
I know for sure there's a thread in Meta about the available polices.
sr. member
Activity: 280
Merit: 250
September 16, 2014, 03:20:52 AM
#6
Is there a list of available fonts? Also is there a way to control the character spacing?
full member
Activity: 194
Merit: 100
Mo Green
August 13, 2014, 12:50:17 AM
#5
I figured out how to do it with imagemagick  Cheesy

https://bitcointalksearch.org/topic/ann-new-piggycoin-piggy-3-interest-web-piggybank-android-piggybank-633803

Yeah, I know need to change the colour  Wink
legendary
Activity: 1246
Merit: 1077
August 12, 2014, 11:12:26 PM
#4
Ah, OK.  I need a custom font really.

Would you happen to know of a way to easily programmatically generate .png images for an ANN post, using a custom font?  I need headers for 'tech specs', 'exchanges', things like that.

If I do it manually in an image editor it's going to take some time and not look as good  Sad

Unfortunately, I know of no such service. A Google search turns up plenty of software that seems to fit your purpose, but the authenticity of them is questionable, as most are raw Windows .exe files with no included source.
full member
Activity: 194
Merit: 100
Mo Green
August 12, 2014, 10:57:24 PM
#3
Ah, OK.  I need a custom font really.

Would you happen to know of a way to easily programmatically generate .png images for an ANN post, using a custom font?  I need headers for 'tech specs', 'exchanges', things like that.

If I do it manually in an image editor it's going to take some time and not look as good  Sad
legendary
Activity: 1246
Merit: 1077
August 12, 2014, 10:55:00 PM
#2
Can I pretty-up an ANN by using custom fonts (using CSS styles), without having to link to images?

You can't use CSS styles on this forum. The closest you can get is the [font] tag. Use as follows:

Code:
[font=Times New Roman,serif]Times New Roman[/font]

Times New Roman

Note that WOFF is not supported; you can only use fonts installed on the viewer's computer.

Providing fallback fonts with commas is a good idea, so that a similar font can be used if the first font listed cannot be found.
full member
Activity: 194
Merit: 100
Mo Green
August 12, 2014, 10:47:07 PM
#1
Can I pretty-up an ANN by using custom fonts (using CSS styles), without having to link to images?
Jump to: