July 06, 2010
Michel Fortin wrote:
> On 2010-07-05 18:41:25 -0400, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> said:
> 
>> It appears on the left-hand side for me.
> 
> He wasn't talking about that one.
> 
	No I wasn't. There is a small drop-down box and button in the
left-hand menu which is perfectly fine by me and a large bar on top
which isn't.

> If you set the preferred language of your browser (or in some cases your OS) to something else than English, you'll see a big light-blue Google Translate bar at the top proposing you to translate the page in whatever preferred language you have. If your browser is set to English as the preferred language (same as the page), it doesn't appear.
> 
> The three screenshots I posted earlier shows what the bar is like:
> 
> http://michelf.com/img/shots/d-website-1.png http://michelf.com/img/shots/d-website-2.png http://michelf.com/img/shots/d-website-3.png
> 
> That was the earlier design, but the bar is still there with this improved design and shift everything downwards when it appears, approximatively one second after the page has loaded.
> 
	And what's worse: my browser is configured to accept English, just
at a lower priority. My language settings are set to: fr_FR, fr,
en_GB, en_US, en which should mean that I'm perfectly happy to read
in English if French is not available. I certainly *don't* want to
read an automatic translation!

		Jerome
-- 
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr



July 06, 2010
Andrei Alexandrescu Wrote:

> On 07/05/2010 02:33 PM, David Gileadi wrote:
> > On 7/5/10 8:51 AM, Andrei Alexandrescu wrote:
> >> On 07/05/2010 09:08 AM, David Gileadi wrote:
> >>> Thanks everyone for your feedback. I sent Walter a new version that addresses some of the issues.
> >>
> >> Feel free to send one to me too, I'll upload it.
> >>
> >> Andrei
> >
> > I'm glad you mentioned this because I CCed you. I went back and looked at it, and sure enough my e-mail failed to include the all-important attachment. I resent.
> 
> Uploaded.
> 
> Andrei

What's up with the fonts in the code examples? Looks horrible now: http://imgur.com/SNTlv.jpg

It looked ok before..


July 06, 2010
On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
> What's up with the fonts in the code examples? Looks horrible now:
> http://imgur.com/SNTlv.jpg
>
> It looked ok before..

I tried an experiment: I reasoned that folks would probably only have custom programming fonts installed when they use them.  So I changed the code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo, Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans Mono', 'Courier New', monospace", where most of these are fonts you're not likely to have installed and others are commonly-used in IDEs.

If the code font bugs a lot of people I'll change it back to something more standard.
July 06, 2010
"David Gileadi" <gileadis@NSPMgmail.com> wrote in message news:i102r0$2sjr$1@digitalmars.com...
> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>> What's up with the fonts in the code examples? Looks horrible now: http://imgur.com/SNTlv.jpg
>>
>> It looked ok before..
>

Except for being really blurry, that screenshot looks fine to me.


> I tried an experiment: I reasoned that folks would probably only have custom programming fonts installed when they use them.  So I changed the code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo, Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans Mono', 'Courier New', monospace", where most of these are fonts you're not likely to have installed and others are commonly-used in IDEs.
>
> If the code font bugs a lot of people I'll change it back to something more standard.

An interesting idea. However, I suspect a lot of people (like me) have a lot of programmer fonts installed because they wanted to try them out, but aren't quite happy with most of them. So there's a good chance that will pick a bad font. In fact, for me, it looks terrible:

http://www.semitwist.com/download/dLangSiteCodeFont.png

Also, I'm not sure, but I don't think most programmer fonts support non-ASCII (or at least non-latin1) chars like the default monospace fonts are likely to (like Courier New), so if there's anything non-ASCII in the code (which D is supposed to support) then I'm not sure if browsers are smart enough to substitute a font that does have the missing character.


July 07, 2010
On 06.07.2010 22:14, David Gileadi wrote:
> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>>  What's up with the fonts in the code examples? Looks horrible now:
>>  http://imgur.com/SNTlv.jpg
>>
>>  It looked ok before..
>
> I tried an experiment: I reasoned that folks would probably only have
> custom programming fonts installed when they use them.  So I changed the
> code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo,
> Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans
> Mono', 'Courier New', monospace", where most of these are fonts you're
> not likely to have installed and others are commonly-used in IDEs.
>
> If the code font bugs a lot of people I'll change it back to something
> more standard.

I'd prefer just letting the web browser use its default monospaced font. Which for Firefox on Windows is Courier New 10 (size 13 in the Mozilla system), and that's also what I use for coding.  IE uses the same font and size, I assume Chrome has a sensible default too.  I don't know about linux or mac.

Using the default font is an easy way to let people choose what font and size they prefer for best readability on their screen.  I really wish web sites wouldn't mess with the monospaced font, but most of them do. :(
July 07, 2010
On 7/7/10 11:12 AM, torhu wrote:
> On 06.07.2010 22:14, David Gileadi wrote:
>> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>>> What's up with the fonts in the code examples? Looks horrible now:
>>> http://imgur.com/SNTlv.jpg
>>>
>>> It looked ok before..
>>
>> I tried an experiment: I reasoned that folks would probably only have
>> custom programming fonts installed when they use them. So I changed the
>> code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo,
>> Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans
>> Mono', 'Courier New', monospace", where most of these are fonts you're
>> not likely to have installed and others are commonly-used in IDEs.
>>
>> If the code font bugs a lot of people I'll change it back to something
>> more standard.
>
> I'd prefer just letting the web browser use its default monospaced font.
> Which for Firefox on Windows is Courier New 10 (size 13 in the Mozilla
> system), and that's also what I use for coding. IE uses the same font
> and size, I assume Chrome has a sensible default too. I don't know about
> linux or mac.
>
> Using the default font is an easy way to let people choose what font and
> size they prefer for best readability on their screen. I really wish web
> sites wouldn't mess with the monospaced font, but most of them do. :(

The default monospaced font on the Mac is Courier and is smaller than other fonts, so it looks a bit odd.  Despite that I'm pretty well convinced by this argument.  Any rebuttals before I make it so?
July 07, 2010
On 07/07/2010 11:51 AM, David Gileadi wrote:
> On 7/7/10 11:12 AM, torhu wrote:
>> On 06.07.2010 22:14, David Gileadi wrote:
>>> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>>>> What's up with the fonts in the code examples? Looks horrible now:
>>>> http://imgur.com/SNTlv.jpg
>>>>
>>>> It looked ok before..
>>>
>>> I tried an experiment: I reasoned that folks would probably only have
>>> custom programming fonts installed when they use them. So I changed the
>>> code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo,
>>> Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans
>>> Mono', 'Courier New', monospace", where most of these are fonts you're
>>> not likely to have installed and others are commonly-used in IDEs.
>>>
>>> If the code font bugs a lot of people I'll change it back to something
>>> more standard.
>>
>> I'd prefer just letting the web browser use its default monospaced font.
>> Which for Firefox on Windows is Courier New 10 (size 13 in the Mozilla
>> system), and that's also what I use for coding. IE uses the same font
>> and size, I assume Chrome has a sensible default too. I don't know about
>> linux or mac.
>>
>> Using the default font is an easy way to let people choose what font and
>> size they prefer for best readability on their screen. I really wish web
>> sites wouldn't mess with the monospaced font, but most of them do. :(
>
> The default monospaced font on the Mac is Courier and is smaller than
> other fonts, so it looks a bit odd. Despite that I'm pretty well
> convinced by this argument. Any rebuttals before I make it so?
That sounds like a good default.  Is there a way to allow users to select a custom monospace font for the pages of this site?  That could be even better.  But it would need to only need to be set once.  (I'm presuming that this CAN be done, as Distributed Proofreading uses something analogous.  But the details are different enough that I'm not sure.  (They require that you download their own custom font, install it, and then change a configurable user setting.  I'm proposing that there just be a configurable user setting, where the user could specify any font of his choosing.)

July 07, 2010
On 7/7/10 12:36 PM, Charles Hixson wrote:
> On 07/07/2010 11:51 AM, David Gileadi wrote:
>> On 7/7/10 11:12 AM, torhu wrote:
>>> On 06.07.2010 22:14, David Gileadi wrote:
>>>> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>>>>> What's up with the fonts in the code examples? Looks horrible now:
>>>>> http://imgur.com/SNTlv.jpg
>>>>>
>>>>> It looked ok before..
>>>>
>>>> I tried an experiment: I reasoned that folks would probably only have
>>>> custom programming fonts installed when they use them. So I changed the
>>>> code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo,
>>>> Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans
>>>> Mono', 'Courier New', monospace", where most of these are fonts you're
>>>> not likely to have installed and others are commonly-used in IDEs.
>>>>
>>>> If the code font bugs a lot of people I'll change it back to something
>>>> more standard.
>>>
>>> I'd prefer just letting the web browser use its default monospaced font.
>>> Which for Firefox on Windows is Courier New 10 (size 13 in the Mozilla
>>> system), and that's also what I use for coding. IE uses the same font
>>> and size, I assume Chrome has a sensible default too. I don't know about
>>> linux or mac.
>>>
>>> Using the default font is an easy way to let people choose what font and
>>> size they prefer for best readability on their screen. I really wish web
>>> sites wouldn't mess with the monospaced font, but most of them do. :(
>>
>> The default monospaced font on the Mac is Courier and is smaller than
>> other fonts, so it looks a bit odd. Despite that I'm pretty well
>> convinced by this argument. Any rebuttals before I make it so?
> That sounds like a good default. Is there a way to allow users to select
> a custom monospace font for the pages of this site? That could be even
> better. But it would need to only need to be set once. (I'm presuming
> that this CAN be done, as Distributed Proofreading uses something
> analogous. But the details are different enough that I'm not sure. (They
> require that you download their own custom font, install it, and then
> change a configurable user setting. I'm proposing that there just be a
> configurable user setting, where the user could specify any font of his
> choosing.)
>

Is there a way?  Yes, but it's probably not feasible.  So far as I'm aware it would either require Javascript which Walter seems generally adverse to as it can slow down page rendering, or would require server-side code which would mean all the pages would have to become dynamically generated instead of static HTML.  Either way would be a fairly large effort.
July 07, 2010
"Charles Hixson" <charleshixsn@earthlink.net> wrote in message news:i12l37$1h0r$1@digitalmars.com...
> On 07/07/2010 11:51 AM, David Gileadi wrote:
>> On 7/7/10 11:12 AM, torhu wrote:
>>> On 06.07.2010 22:14, David Gileadi wrote:
>>>> On 7/6/10 1:02 PM, Andrej Mitrovic wrote:
>>>>> What's up with the fonts in the code examples? Looks horrible now: http://imgur.com/SNTlv.jpg
>>>>>
>>>>> It looked ok before..
>>>>
>>>> I tried an experiment: I reasoned that folks would probably only have custom programming fonts installed when they use them. So I changed the code font to "Inconsolata, Proggy, Monofur, ProFont, Dina, MonteCarlo, Pragmata, Anonymous, Monaco, Consolas, 'Andale Mono', 'Deja Vu Sans Mono', 'Courier New', monospace", where most of these are fonts you're not likely to have installed and others are commonly-used in IDEs.
>>>>
>>>> If the code font bugs a lot of people I'll change it back to something more standard.
>>>
>>> I'd prefer just letting the web browser use its default monospaced font. Which for Firefox on Windows is Courier New 10 (size 13 in the Mozilla system), and that's also what I use for coding. IE uses the same font and size, I assume Chrome has a sensible default too. I don't know about linux or mac.
>>>
>>> Using the default font is an easy way to let people choose what font and size they prefer for best readability on their screen. I really wish web sites wouldn't mess with the monospaced font, but most of them do. :(
>>
>> The default monospaced font on the Mac is Courier and is smaller than other fonts, so it looks a bit odd. Despite that I'm pretty well convinced by this argument. Any rebuttals before I make it so?
>
> That sounds like a good default.  Is there a way to allow users to select a custom monospace font for the pages of this site?  That could be even better.  But it would need to only need to be set once.  (I'm presuming that this CAN be done, as Distributed Proofreading uses something analogous.  But the details are different enough that I'm not sure.  (They require that you download their own custom font, install it, and then change a configurable user setting.  I'm proposing that there just be a configurable user setting, where the user could specify any font of his choosing.)
>

It'd be easy if server-scripting is available:

Make a form with a drop-down containing typical font names, plus "Other..." and a text-field for "Other". When the user submits the form, set a cookie with the chosen font name in it. When their browser requests the CSS file, check if the cookie exists and contains a font name and, if so, stick it in here: "code { font-family: {customFontNameHere}, monospace; }".

You can do the same thing with DHTML too (set the form button's "onclick" to add 'style="font-family:..."' to all the code tags), which would work without server-scripting, but that would require JS to be enabled, it wouldn't work between sessions, and you'd probably have to keep the user on the same page all the time and change all the links to just simply replace the page content instead of linking to a new page (I'm not sure that JS by itself can maintain any state between pages. If it can, that's news to me. Maybe something involving a hidden frame would work? Or if you want to be a real asshole to the user, you could use Flash SuperCookies or ActiveX ;) ).

Another idea would be to make the online-docs use the server-scripting method, and then for the downloaded docs, add a simple command to the DMD distro to build the docs, but have it take an optional "code font name".


July 07, 2010
Nick Sabalausky wrote:
> You can do the same thing with DHTML too (set the form button's "onclick" to add 'style="font-family:..."' to all the code tags), which would work without server-scripting, but that would require JS to be enabled, it wouldn't work between sessions, and you'd probably have to keep the user on the same page all the time and change all the links to just simply replace the page content instead of linking to a new page (I'm not sure that JS by itself can maintain any state between pages. If it can, that's news to me. Maybe something involving a hidden frame would work? Or if you want to be a real asshole to the user, you could use Flash SuperCookies or ActiveX ;) ).
> 
	It's possible with a very little JS and mostly static html. Check
http://www.alistapart.com/articles/alternate/ for something similar.

		Jerome
-- 
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr