Bitcoin Forum

Other => Meta => Topic started by: greenmo on August 13, 2014, 03:47:07 AM



Title: Custom fonts in BBCode using CSS
Post by: greenmo on August 13, 2014, 03:47:07 AM
Can I pretty-up an ANN by using custom fonts (using CSS styles), without having to link to images?


Title: Re: Custom fonts in BBCode using CSS
Post by: dree12 on August 13, 2014, 03:55:00 AM
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.


Title: Re: Custom fonts in BBCode using CSS
Post by: greenmo on August 13, 2014, 03:57:24 AM
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  :(


Title: Re: Custom fonts in BBCode using CSS
Post by: dree12 on August 13, 2014, 04:12:26 AM
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  :(

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.


Title: Re: Custom fonts in BBCode using CSS
Post by: greenmo on August 13, 2014, 05:50:17 AM
I figured out how to do it with imagemagick  :D

https://bitcointalk.org/index.php?topic=633803.0

Yeah, I know need to change the colour  ;)


Title: Re: Custom fonts in BBCode using CSS
Post by: sonysasankan on September 16, 2014, 08:20:52 AM
Is there a list of available fonts? Also is there a way to control the character spacing?


Title: Re: Custom fonts in BBCode using CSS
Post by: jackjack on September 16, 2014, 10:12:59 AM
Yes. No.
I know for sure there's a thread in Meta about the available polices.


Title: Re: Custom fonts in BBCode using CSS
Post by: deepceleron on September 16, 2014, 11:25:22 AM
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.