diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb index cbea5c43..c690087c 100644 --- a/test/unit/page_renderer_test.rb +++ b/test/unit/page_renderer_test.rb @@ -45,7 +45,7 @@ class PageRendererTest < ActiveSupport::TestCase end def test_wiki_links_after_empty - assert_markup_parsed_as(%{\n

This is a wikilink\n

This is a wikilink?.

}, "\n\nThis is a [[wikilink]].") end @@ -55,7 +55,7 @@ class PageRendererTest < ActiveSupport::TestCase "would be My Way " + "" + "sin(x)" + - " in kinda " + + " in kinda " + "That Way in " + "His Way? " + %{though My Way OverThere \342\200\223 see } + @@ -164,7 +164,7 @@ END_THM %{
sin} + %{(x)} + - %{} + + %{} + %{\\sin(x) \\begin{svg}<svg/>\\end{svg}
}, "$$\\sin(x) \\begin{svg}\\end{svg}$$") @@ -601,7 +601,7 @@ END_THM # currently, upper case HTML elements are not allowed assert_markup_parsed_as( - "

This <IMG SRC='http://hobix.com/sample.jpg' alt=''/> is an inline image link.

", + "

This <IMG SRC='http://hobix.com/sample.jpg' alt=''></IMG> is an inline image link.

", 'This is an inline image link.') end @@ -659,7 +659,7 @@ END_THM "My Way " + "" + "sin(x)" + - " in kinda " + + " in kinda " + "That Way in " + "His Way though " + %{My Way OverThere \342\200\223 see } + diff --git a/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb b/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb index b5709a4c..80b5f01c 100644 --- a/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb +++ b/vendor/plugins/maruku/lib/maruku/output/s5/to_s5.rb @@ -107,14 +107,14 @@ require 'maruku/string_utils' end if (content_only) - xml = body.to_xml(:indent => (context[:indent] || 2), :save_with => 2 ) + xml = body.to_xml(:indent => (context[:indent] || 2), :save_with => 18 ) else doc2 = Nokogiri::XML::Document.parse("
"+S5_external+"
") doc2.root.children.each{ |child| head << child } add_css_to(head) - xml = html.to_xml(:indent => (context[:indent] || 2), :save_with => 2 ) + xml = html.to_xml(:indent => (context[:indent] || 2), :save_with => 18 ) Xhtml11_mathml2_svg11 + xml end end diff --git a/vendor/plugins/maruku/lib/maruku/output/to_html.rb b/vendor/plugins/maruku/lib/maruku/output/to_html.rb index 919d0271..7b55e760 100644 --- a/vendor/plugins/maruku/lib/maruku/output/to_html.rb +++ b/vendor/plugins/maruku/lib/maruku/output/to_html.rb @@ -46,7 +46,7 @@ module MaRuKu; module Out; module HTML d.root << render_footnotes end - xml = d.to_xml(:indent => (context[:indent] || 2), :save_with => 2 ) + xml = d.to_xml(:indent => (context[:indent] || 2), :save_with => 18 ) xml.gsub!(/\A\s*|\s*<\/dummy>\s*\Z|\A/,'') xml @@ -59,7 +59,7 @@ module MaRuKu; module Out; module HTML doc = to_html_document_tree xml = "" - xml = doc.to_xml(:indent => (context[:indent] || 2), :save_with => 2 ) + xml = doc.to_xml(:indent => (context[:indent] || 2), :save_with => 18 ) Xhtml11_mathml2_svg11 + xml end diff --git a/vendor/plugins/maruku/spec/block_docs/alt.md b/vendor/plugins/maruku/spec/block_docs/alt.md index bf4e90db..0314d6ed 100644 --- a/vendor/plugins/maruku/spec/block_docs/alt.md +++ b/vendor/plugins/maruku/spec/block_docs/alt.md @@ -8,7 +8,7 @@ Write a comment here *** Output of inspect *** md_el(:document,[md_par([md_im_image(["bar"], "/foo.jpg", nil)])],{},[]) *** Output of to_html *** -

bar

+

bar

*** Output of to_latex *** *** Output of to_md *** diff --git a/vendor/plugins/maruku/spec/block_docs/footnotes.md b/vendor/plugins/maruku/spec/block_docs/footnotes.md index 3fd57bec..c6cdd1ac 100644 --- a/vendor/plugins/maruku/spec/block_docs/footnotes.md +++ b/vendor/plugins/maruku/spec/block_docs/footnotes.md @@ -57,7 +57,7 @@ md_el(:document,[

That’s some text with a footnote 1 and another 2 and another 3.

This is not a footnote.

-

  1. +

    1. And that’s the footnote. This is second sentence (same paragraph).

    2. This is the very long one.

      diff --git a/vendor/plugins/maruku/spec/block_docs/hrule.md b/vendor/plugins/maruku/spec/block_docs/hrule.md index 8cc1f19d..5321c502 100644 --- a/vendor/plugins/maruku/spec/block_docs/hrule.md +++ b/vendor/plugins/maruku/spec/block_docs/hrule.md @@ -22,7 +22,7 @@ md_el(:document,[ md_el(:hrule,[],{},[]) ],{},[]) *** Output of to_html *** -




      +




      *** Output of to_latex *** \vspace{.5em} \hrule \vspace{.5em} diff --git a/vendor/plugins/maruku/spec/block_docs/html2.md b/vendor/plugins/maruku/spec/block_docs/html2.md index 5bb70312..114f6710 100644 --- a/vendor/plugins/maruku/spec/block_docs/html2.md +++ b/vendor/plugins/maruku/spec/block_docs/html2.md @@ -12,8 +12,8 @@ md_el(:document,[ md_html("
      ") ],{},[]) *** Output of to_html *** -

      One

      123

      -
      +

      One

      123

      +
      *** Output of to_latex *** One 123 *** Output of to_md *** diff --git a/vendor/plugins/maruku/spec/block_docs/html4.md b/vendor/plugins/maruku/spec/block_docs/html4.md index 9a25d280..0632991e 100644 --- a/vendor/plugins/maruku/spec/block_docs/html4.md +++ b/vendor/plugins/maruku/spec/block_docs/html4.md @@ -15,7 +15,7 @@ md_el(:document,[ ],{},[]) *** Output of to_html ***
      - +
      *** Output of to_latex *** diff --git a/vendor/plugins/maruku/spec/block_docs/html5.md b/vendor/plugins/maruku/spec/block_docs/html5.md index 253e17f8..7baa4b35 100644 --- a/vendor/plugins/maruku/spec/block_docs/html5.md +++ b/vendor/plugins/maruku/spec/block_docs/html5.md @@ -13,7 +13,7 @@ md_el(:document,[ ],{},[]) *** Output of to_html ***
      - Aperitif + Aperitif
      *** Output of to_latex *** diff --git a/vendor/plugins/maruku/spec/block_docs/ie.md b/vendor/plugins/maruku/spec/block_docs/ie.md index 935ef2ce..ef3c0e16 100644 --- a/vendor/plugins/maruku/spec/block_docs/ie.md +++ b/vendor/plugins/maruku/spec/block_docs/ie.md @@ -31,11 +31,11 @@ md_el(:document,[
      <p>here's an apostrophe & a quote "</p>
      -
      <p>here's an apostrophe & a quote "</p>
      +
      <p>here's an apostrophe & a quote "</p>
      -
      <p>here's an apostrophe & a quote "</p>
      +
      <p>here's an apostrophe & a quote "</p>
      -
      <p>here's an apostrophe & a quote "</p>
      +
      <p>here's an apostrophe & a quote "</p>
      *** Output of to_latex *** {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char60p\char62here\char39s~an~apostrophe~\char38~a~quote~\char34\char60\char47p\char62}} diff --git a/vendor/plugins/maruku/spec/block_docs/images.md b/vendor/plugins/maruku/spec/block_docs/images.md index 3fb25f8a..e3122974 100644 --- a/vendor/plugins/maruku/spec/block_docs/images.md +++ b/vendor/plugins/maruku/spec/block_docs/images.md @@ -52,15 +52,15 @@ md_el(:document,[ md_ref_def("css2", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"}) ],{},[]) *** Output of to_html *** -

      This page does not utilize Cascading Style Sheets

      +

      This page does not utilize Cascading Style Sheets

      -

      Please mouseover to see the title: Cascading Style Sheets

      +

      Please mouseover to see the title: Cascading Style Sheets

      -

      Please mouseover to see the title: Cascading Style Sheets

      +

      Please mouseover to see the title: Cascading Style Sheets

      -

      I’ll say it one more time: this page does not use Cascading Style Sheets

      +

      I’ll say it one more time: this page does not use Cascading Style Sheets

      -

      This is double size: Cascading Style Sheets

      +

      This is double size: Cascading Style Sheets

      *** Output of to_latex *** This page does not utilize diff --git a/vendor/plugins/maruku/spec/block_docs/images2.md b/vendor/plugins/maruku/spec/block_docs/images2.md index 77bace62..2df9f01b 100644 --- a/vendor/plugins/maruku/spec/block_docs/images2.md +++ b/vendor/plugins/maruku/spec/block_docs/images2.md @@ -16,9 +16,9 @@ md_el(:document,[ md_ref_def("image", "image.jpg", {:title=>nil}) ],{},[]) *** Output of to_html *** -

      This is an image.

      +

      This is an image.

      -

      This is an image.

      +

      This is an image.

      *** Output of to_latex *** This is an . diff --git a/vendor/plugins/maruku/spec/block_docs/inline_html.md b/vendor/plugins/maruku/spec/block_docs/inline_html.md index 39d9dd5d..2c155c7b 100644 --- a/vendor/plugins/maruku/spec/block_docs/inline_html.md +++ b/vendor/plugins/maruku/spec/block_docs/inline_html.md @@ -73,12 +73,12 @@ md_el(:document,[
      <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
      -

      Result on span:

      +

      Result on span:

      Result alone:

      - +

      Without closing:

      -
      +

      This is

      diff --git a/vendor/plugins/maruku/spec/block_docs/lists_after_paragraph.md b/vendor/plugins/maruku/spec/block_docs/lists_after_paragraph.md index 0c5f648e..2e8c9fe1 100644 --- a/vendor/plugins/maruku/spec/block_docs/lists_after_paragraph.md +++ b/vendor/plugins/maruku/spec/block_docs/lists_after_paragraph.md @@ -102,9 +102,9 @@ md_el(:document,[

      Paragraph (1 space after), list with no space: * ciao

      -

      Paragraph (2 spaces after), list with no space:
      * ciao

      +

      Paragraph (2 spaces after), list with no space:
      * ciao

      -

      Paragraph (3 spaces after), list with no space:
      * ciao

      +

      Paragraph (3 spaces after), list with no space:
      * ciao

      Paragraph with block quote:

      @@ -120,7 +120,7 @@ md_el(:document,[

      header

      -

      Paragraph with html after

      +

      Paragraph with html after

      Paragraph with html after, indented: Emphasis

      diff --git a/vendor/plugins/maruku/spec/block_docs/loss.md b/vendor/plugins/maruku/spec/block_docs/loss.md index 08cb73e1..14bf60ba 100644 --- a/vendor/plugins/maruku/spec/block_docs/loss.md +++ b/vendor/plugins/maruku/spec/block_docs/loss.md @@ -7,7 +7,7 @@ Write a comment here *** Output of inspect *** md_el(:document,[md_html("
      ")],{},[]) *** Output of to_html *** -
      +
      *** Output of to_latex *** *** Output of to_md *** diff --git a/vendor/plugins/maruku/spec/block_docs/notyet/triggering.md b/vendor/plugins/maruku/spec/block_docs/notyet/triggering.md index 0c04644b..160f04ae 100644 --- a/vendor/plugins/maruku/spec/block_docs/notyet/triggering.md +++ b/vendor/plugins/maruku/spec/block_docs/notyet/triggering.md @@ -74,9 +74,9 @@ md_el(:document,[

      Paragraph (1 space after), list with no space: * ciao

      -

      Paragraph (2 spaces after), list with no space:
      * ciao

      +

      Paragraph (2 spaces after), list with no space:
      * ciao

      -

      Paragraph (3 spaces after), list with no space:
      * ciao

      +

      Paragraph (3 spaces after), list with no space:
      * ciao

      Paragraph with block quote:

      diff --git a/vendor/plugins/maruku/spec/block_docs/paragraphs.md b/vendor/plugins/maruku/spec/block_docs/paragraphs.md index a858b1c1..db9e7f77 100644 --- a/vendor/plugins/maruku/spec/block_docs/paragraphs.md +++ b/vendor/plugins/maruku/spec/block_docs/paragraphs.md @@ -28,7 +28,7 @@ md_el(:document,[

      Paragraph 2

      -

      Paragraph 3 Paragraph 4 Paragraph Br->
      Paragraph 5

      +

      Paragraph 3 Paragraph 4 Paragraph Br->
      Paragraph 5

      *** Output of to_latex *** Paragraph 1 diff --git a/vendor/plugins/maruku/spec/block_docs/pending/empty_cells.md b/vendor/plugins/maruku/spec/block_docs/pending/empty_cells.md index 798d8ca9..61fd62a4 100644 --- a/vendor/plugins/maruku/spec/block_docs/pending/empty_cells.md +++ b/vendor/plugins/maruku/spec/block_docs/pending/empty_cells.md @@ -21,8 +21,8 @@ md_el(:document,[ ],{:align=>[:left, :left, :left]},[]) ],{},[]) *** Output of to_html *** - - +
      12
      AX
      BX
      +
      12
      AX
      BX
      *** Output of to_latex *** \begin{tabular}{l|l|l} diff --git a/vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md b/vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md index 174900a4..14ecdb1c 100644 --- a/vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md +++ b/vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md @@ -381,40 +381,40 @@ md_el(:document,[ md_ref_def("spec", "http://?>", {:title=>") *[DRY]: Don"}) ],{},[]) *** Output of to_html *** -

      WebKit (Safari 3.1) and the CSS @font-face declaration

      +

      WebKit (Safari 3.1) and the CSS @font-face declaration

      -

      I’m a big fan of typography in general. If you check out my homepage or my contact elliottcable page, and you’re using Safari/WebKit or Opera/Kestrel, you’ll notice the typefaces (fonts, as colloquialized) are very non-standard. (As of this writing, I’m using Museo and Diavlo1 heavily on both.)

      +

      I’m a big fan of typography in general. If you check out my homepage or my contact elliottcable page, and you’re using Safari/WebKit or Opera/Kestrel, you’ll notice the typefaces (fonts, as colloquialized) are very non-standard. (As of this writing, I’m using Museo and Diavlo1 heavily on both.)

      The internet has not be a friendly place for typohiles like myself, up to this point, at least. One might even say it was a frightful, mentally scarring environment for those akin to yours truly. We’ve been restricted to reading page after page after page on day after day after day for year after year after year abominations of markup and design enslaved by the horrible overlords we know as Lucida, Verdana, Arial, Helvetica, Geneva, Georgia, Courier, and… dare I invoke ye, thou my terrible overlord? Times New Roman.

      Wherefore art thou, my glorious Archer? And thee as well, my beautiful Garamond? The technical restrictions of that horrible monster we know as the Web Browser hath forced us all too long to use those most banal, those most common, and those most abused, out of all of the typefaces of the world.

      -

      All hyperbole aside, I’m extremely happy to see the advent of a standard @font-face declaration in CSS. Internet Explorer first implemented a crutched, basic version of this way back in version 4, but nothing ever really came of it - their decision to create the proprietary .EOT2 format to appease overly restrictive type foundries’ worries about intellectual property (aka. the cold, hard dominatrix that we know only as Ms. Profit) truly and completely killed that initial attempt at bringing astute typography and it’s advocates to the web. This new run at @font-face by an established, trusted, and open group (the W3C itself, responsible for helping to make much of what we use as designers on the web standard and cross-system compatible) has a much better chance, in my humble opinion - and I am quite looking forward to the consequences if it succeeds.

      +

      All hyperbole aside, I’m extremely happy to see the advent of a standard @font-face declaration in CSS. Internet Explorer first implemented a crutched, basic version of this way back in version 4, but nothing ever really came of it - their decision to create the proprietary .EOT2 format to appease overly restrictive type foundries’ worries about intellectual property (aka. the cold, hard dominatrix that we know only as Ms. Profit) truly and completely killed that initial attempt at bringing astute typography and it’s advocates to the web. This new run at @font-face by an established, trusted, and open group (the W3C itself, responsible for helping to make much of what we use as designers on the web standard and cross-system compatible) has a much better chance, in my humble opinion - and I am quite looking forward to the consequences if it succeeds.

      Now, onwards to the topic of my post as declared in the header (yes, I know, a slow start - but it’s an interesting topic with an interesting history!). WebKit, the open source rendering engine behind the wonderfulness that is Safari, and how it handles the ‘new’ @font-face declaration. No, it’s not really ‘new’, but yes, it feels like it is.

      To put it simply, and to be very blunt, it’s broken.

      -

      The CSS spec section for @font-face is very specific - typefaces are to be selected based on a wide array of criteria placed in the @font-face declaration block itself. Various textual CSS attributes may be defined within the @font-face declaration, and then they will be checked when the typeface is referred to later in the CSS. For instance, if I have two @font-face declarations for the Diavlo family - one for regular text, and one for a heavier weighted version of the typeface - then I later utilize Diavlo in a font-family: attribute, it should refer to the basic Diavlo font defined in the first @font-face. However, if I were to do the same, but also specify a heavy font-weight:, then it should use the heavier version of Diavlo. To place this example in code:

      +

      The CSS spec section for @font-face is very specific - typefaces are to be selected based on a wide array of criteria placed in the @font-face declaration block itself. Various textual CSS attributes may be defined within the @font-face declaration, and then they will be checked when the typeface is referred to later in the CSS. For instance, if I have two @font-face declarations for the Diavlo family - one for regular text, and one for a heavier weighted version of the typeface - then I later utilize Diavlo in a font-family: attribute, it should refer to the basic Diavlo font defined in the first @font-face. However, if I were to do the same, but also specify a heavy font-weight:, then it should use the heavier version of Diavlo. To place this example in code:

      @font-face {
      -  font-family: 'Diavlo';
      -  src: url(./Diavlo/Diavlo_Book.otf) format("opentype");
      +  font-family: 'Diavlo';
      +  src: url(./Diavlo/Diavlo_Book.otf) format("opentype");
       }
       
       @font-face {
      -  font-family: 'Diavlo';
      +  font-family: 'Diavlo';
         font-weight: 900;
      -  src: url(./Diavlo/Diavlo_Black.otf) format("opentype");
      +  src: url(./Diavlo/Diavlo_Black.otf) format("opentype");
       }
       
       h1, h2, h3, h4, h5, h6 {
      -  font-family: 'Diavlo';
      +  font-family: 'Diavlo';
         font-weight: 900;
       }
       
       div#content {
      -  font-family: 'Diavlo';
      +  font-family: 'Diavlo';
       }

      As you can see, my headings should use the typeface defined in Diavlo_Black.otf, while my body content should use Diavlo_Book.otf. However, in WebKit, this doesn’t work - it completely ignores any attribute except font-family: and src: in a @font-face declaration! Completely ignores them! Not only that - not only that - it disregards all but the last @font-face for a given font-family: attribute string!

      @@ -422,21 +422,21 @@ div#content {

      The implication here is that, to make @font-face work as it is currently implemented in WebKit (and thus, Safari 3.1), I have to declare completely imaginary, non-existent type families to satisfy WebKit alone. Here’s the method I have used in the places I current implement @font-face:

      @font-face {
      -  font-family: 'Diavlo Book';
      -  src: url(./Diavlo/Diavlo_Book.otf) format("opentype");
      +  font-family: 'Diavlo Book';
      +  src: url(./Diavlo/Diavlo_Book.otf) format("opentype");
       }
       
       @font-face {
      -  font-family: 'Diavlo Black';
      -  src: url(./Diavlo/Diavlo_Black.otf) format("opentype");
      +  font-family: 'Diavlo Black';
      +  src: url(./Diavlo/Diavlo_Black.otf) format("opentype");
       }
       
       h1, h2, h3, h4, h5, h6 {
      -  font-family: 'Diavlo Black';
      +  font-family: 'Diavlo Black';
       }
       
       div#content {
      -  font-family: 'Diavlo Book';
      +  font-family: 'Diavlo Book';
       }

      Isn’t it horrible? Seriously, my eyes, they bleed. There’s lots of problems with this far beyond the lack of semanticity when it comes to the typeface names… let me see how many ways this breaks the purpose of @font-face:

      @@ -447,7 +447,7 @@ div#content {

      As soon as we begin to use @font-face in our page, we can no longer make any use of any other textual control attribute - font-weight:, font-style:, and font-variant: are no longer available to us, because they no longer correctly map to technical typeface variant/features.

      -

      Also, many default elements are destroyed, unusable, without ‘fixing’ - for instance, <b> would have no effect in a page styled for WebKit as above; We would have to specify something like b {font-family: 'Diavlo Black';} - how broken is that? Unless we caught all such default elements and re-styled them to use the bastardized names instead of the correct attributes, lots of basic HTML formatting would be broken. I myself may never use in-document formatting (separation of design and content!), but what about comments forms? Forum posts? Direct HTML-literal quotes?

      +

      Also, many default elements are destroyed, unusable, without ‘fixing’ - for instance, <b> would have no effect in a page styled for WebKit as above; We would have to specify something like b {font-family: 'Diavlo Black';} - how broken is that? Unless we caught all such default elements and re-styled them to use the bastardized names instead of the correct attributes, lots of basic HTML formatting would be broken. I myself may never use in-document formatting (separation of design and content!), but what about comments forms? Forum posts? Direct HTML-literal quotes?

      If we want to use Javascript to modify the display of the content, we can’t simply adjust the mentioned textual control attributes - we have to know and change the entire font-family: array of strings.

    3. @@ -455,7 +455,7 @@ div#content {
    4. You make us very wet.

      -

      And by wet, I mean ‘not DRY’. What if we decide to change one of the bastardized font names? Or use a different font entirely? We have to go through all of our CSS, all of our Javascript, and make sure we update every occurrence of the typeface’s bastardized name.

      +

      And by wet, I mean ‘not DRY’. What if we decide to change one of the bastardized font names? Or use a different font entirely? We have to go through all of our CSS, all of our Javascript, and make sure we update every occurrence of the typeface’s bastardized name.

    5. @@ -470,32 +470,97 @@ div#content {

      In summary… come on, WebKit team, this isn’t like you - you’re always the ones with the closest-to-standard implementation, and the cleanest code, and… hell, overall? Webkit is the most secure/fastest browser available. But this is making me lose my faith in you, guys, please get it right. You’re pioneering a leap into the future when it comes to the Web - this is as important, or more important, than Mosiac’s allowing of images was.

      To put it succinctly - don’t fuck this up, y’all.

      - -

      CSS: Cascading Style Sheets.EOT: Embedded OpenType 3: To give Microsoft a little credit, something I rarely do… Yes, I’m aware Microsoft submitted EOT to the W3C as a proposal - the problem isn’t with their attempts to make it non-proprietary, but with the basic concept of making typefaces on the web DRMed. Look what such attempts have done to the music and video industry - simply decimated it. Do we really want to see the same thing happen to our beloved medium as typography moves into the 21st century? W3C: World Wide Web Consortium

      -

        +

        1. +

          These are fonts by Jos Buivenga, quite the amazing person. His (free) fonts are, uniquely, released for use on the web in @font-face declarations - unlike the vast majority of other (even free to download) typefaces, which have ridiculously restricting licenses and terms of use statements. Props, Jos - you’re a pioneer, and deserve recognition as such.

          +
        2. +

          To give Microsoft a little credit, something I rarely do… Yes, I’m aware Microsoft submitted EOT to the W3C as a proposal - the problem isn’t with their attempts to make it non-proprietary, but with the basic concept of making typefaces on the web DRMed. Look what such attempts have done to the music and video industry - simply decimated it. Do we really want to see the same thing happen to our beloved medium as typography moves into the 21st century?

          +
        *** Output of to_latex *** -# -./lib/maruku/output/to_latex.rb:466:in `to_latex_footnote_reference' -./lib/maruku/output/to_latex.rb:538:in `send' -./lib/maruku/output/to_latex.rb:538:in `array_to_latex' -./lib/maruku/output/to_latex.rb:529:in `each' -./lib/maruku/output/to_latex.rb:529:in `array_to_latex' -./lib/maruku/output/to_latex.rb:524:in `children_to_latex' -./lib/maruku/output/to_latex.rb:158:in `to_latex_paragraph' -./lib/maruku/output/to_latex.rb:538:in `send' -./lib/maruku/output/to_latex.rb:538:in `array_to_latex' -./lib/maruku/output/to_latex.rb:529:in `each' -./lib/maruku/output/to_latex.rb:529:in `array_to_latex' -./lib/maruku/output/to_latex.rb:524:in `children_to_latex' -./lib/maruku/output/to_latex.rb:42:in `to_latex' -bin/marutest:93:in `send' -bin/marutest:93:in `run_test' -bin/marutest:88:in `each' -bin/marutest:88:in `run_test' -bin/marutest:262:in `marutest' -bin/marutest:259:in `each' -bin/marutest:259:in `marutest' -bin/marutest:334 +\hypertarget{webkit_safari_31_and_the_css_fontface_declaration_1}{}\section*{{WebKit (Safari 3.1) and the CSS @font-face declaration}}\label{webkit_safari_31_and_the_css_fontface_declaration_1} + +I'{}m a big fan of typography in general. If you check out \href{http://elliottcable.name}{my homepage} or my \href{http://elliottcable.name/contact.xhtml}{contact elliottcable} page, and you'{}re using Safari/WebKit or Opera/Kestrel, you'{}ll notice the typefaces (fonts, as colloquialized) are \emph{very} non-standard. (As of this writing, I'{}m using \href{http://www.josbuivenga.demon.nl/museo.html}{Museo} and \href{http://www.josbuivenga.demon.nl/diavlo.html}{Diavlo}\footnote{These are fonts by \href{jos}{Jos Buivenga}, quite the amazing person. His (free) fonts are, uniquely, released for use on the web in {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declarations - unlike the vast majority of other (even free to download) typefaces, which have ridiculously restricting licenses and terms of use statements. Props, Jos - you'{}re a pioneer, and deserve recognition as such.} heavily on both.) + +The internet has not be a friendly place for typohiles like myself, up to this point, at least. One might even say it was a frightful, mentally scarring environment for those akin to yours truly. We'{}ve been restricted to reading page after page after page on day after day after day for year after year after year abominations of markup and design enslaved by the horrible overlords we know as Lucida, Verdana, Arial, Helvetica, Geneva, Georgia, Courier, and\ldots{} dare I invoke ye, thou my terrible overlord? Times New Roman. + +Wherefore art thou, my glorious Archer? And thee as well, my beautiful Garamond? The technical restrictions of that horrible monster we know as the Web Browser hath forced us all too long to use those most banal, those most common, and those most abused, out of all of the typefaces of the world. + +All hyperbole aside, I'{}m extremely happy to see the advent of a standard {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration in CSS. Internet Explorer first implemented a crutched, basic version of this way back in version 4, but nothing ever really came of it - their decision to create the proprietary .EOT\footnote{To give Microsoft a little credit, something I rarely do\ldots{} Yes, I'{}m aware Microsoft submitted EOT to the W3C as a proposal - the problem isn'{}t with their attempts to make it non-proprietary, but with the basic concept of making typefaces on the web DRMed. Look what such attempts have done to the music and video industry - simply decimated it. Do we really want to see the same thing happen to our beloved medium as typography moves into the 21st century?} format to appease overly restrictive type foundries'{} worries about intellectual property (aka. the cold, hard dominatrix that we know only as Ms. Profit) truly and completely killed that initial attempt at bringing astute typography and it'{}s advocates to the web. This new run at {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} by an established, trusted, and open group (the \href{http://w3c.org}{W3C} itself, responsible for helping to make much of what we use as designers on the web standard and cross-system compatible) has a much better chance, in my humble opinion - and I am quite looking forward to the consequences if it succeeds. + +Now, onwards to the topic of my post as declared in the header (yes, I know, a slow start - but it'{}s an interesting topic with an interesting history!). WebKit, the open source rendering engine behind the wonderfulness that is Safari, and how it handles the `{}new'{} {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration. No, it'{}s not really `{}new'{}, but yes, it feels like it is. + +To put it simply, and to be very blunt, it'{}s broken. + +The \href{http://?}{CSS spec section} for {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} is very specific - typefaces are to be selected based on a wide array of criteria placed in the {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration block itself. Various textual CSS attributes may be defined within the {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration, and then they will be checked when the typeface is referred to later in the CSS. For instance, if I have two {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declarations for the Diavlo family - one for regular text, and one for a heavier weighted version of the typeface - then I later utilize Diavlo in a {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45family\char58}} attribute, it should refer to the basic Diavlo font defined in the first {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}}. However, if I were to do the same, but also specify a heavy {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45weight\char58}}, then it should use the heavier version of Diavlo. To place this example in code: + +\begin{verbatim}@font-face { + font-family: 'Diavlo'; + src: url(./Diavlo/Diavlo_Book.otf) format("opentype"); +} + +@font-face { + font-family: 'Diavlo'; + font-weight: 900; + src: url(./Diavlo/Diavlo_Black.otf) format("opentype"); +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Diavlo'; + font-weight: 900; +} + +div#content { + font-family: 'Diavlo'; +}\end{verbatim} +As you can see, my headings should use the typeface defined in {\colorbox[rgb]{1.00,0.93,1.00}{\tt Diavlo\char95Black\char46otf}}, while my body content should use {\colorbox[rgb]{1.00,0.93,1.00}{\tt Diavlo\char95Book\char46otf}}. However, in WebKit, this doesn'{}t work - it completely ignores any attribute except {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45family\char58}} and {\colorbox[rgb]{1.00,0.93,1.00}{\tt src\char58}} in a {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration! Completely ignores them! Not only that - not \emph{only} that - it disregards all but the last {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} for a given {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45family\char58}} attribute string! + +The implication here is that, to make {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} work as it is currently implemented in WebKit (and thus, Safari 3.1), I have to declare \emph{completely imaginary, non-existent type families} to satisfy WebKit alone. Here'{}s the method I have used in the places I current implement {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}}: + +\begin{verbatim}@font-face { + font-family: 'Diavlo Book'; + src: url(./Diavlo/Diavlo_Book.otf) format("opentype"); +} + +@font-face { + font-family: 'Diavlo Black'; + src: url(./Diavlo/Diavlo_Black.otf) format("opentype"); +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Diavlo Black'; +} + +div#content { + font-family: 'Diavlo Book'; +}\end{verbatim} +Isn'{}t it horrible? Seriously, my eyes, they bleed. There'{}s lots of problems with this far beyond the lack of semanticity when it comes to the typeface names\ldots{} let me see how many ways this breaks the purpose of {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}}: + +\begin{itemize}% +\item You remove a large element our control over the display of the page. + +As soon as we begin to use {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} in our page, we can no longer make any use of any other textual control attribute - {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45weight\char58}}, {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45style\char58}}, and {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45variant\char58}} are no longer available to us, because they no longer correctly map to technical typeface variant/features. + +Also, many default elements are destroyed, unusable, without `{}fixing'{} - for instance, {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char60b\char62}} would have no effect in a page styled for WebKit as above; We would have to specify something like {\colorbox[rgb]{1.00,0.93,1.00}{\tt b\char32\char123font\char45family\char58\char32\char39Diavlo\char32Black\char39\char59\char125}} - how broken is that? Unless we caught all such default elements and re-styled them to use the bastardized names instead of the correct attributes, lots of basic HTML formatting would be broken. I myself may never use in-document formatting (separation of design and content!), but what about comments forms? Forum posts? Direct HTML-literal quotes? + +If we want to use Javascript to modify the display of the content, we can'{}t simply adjust the mentioned textual control attributes - we have to know and change the entire {\colorbox[rgb]{1.00,0.93,1.00}{\tt font\char45family\char58}} array of strings. + + +\item You make us very wet. + +And by wet, I mean `{}not DRY'{}. What if we decide to change one of the bastardized font names? Or use a different font entirely? We have to go through all of our CSS, all of our Javascript, and make sure we update every occurrence of the typeface'{}s bastardized name. + + +\item You remove our user'{}s user choice, and waste bandwidth. + +Since the names refer to families that don'{}t, in fact, exist, the browser can'{}t override the declaration with a user'{}s installed version of the typeface. This means that, regardless of whether the user already has the typeface installed on their own computer, the browser won'{}t use that - it doesn'{}t know to use `{}Diavlo'{}, which the user has installed, because it was told to use `{}Diavlo Black'{}, which no user in the entire world has installed on their computer. + + + +\end{itemize} +This whole thing is rather worrying - I'{}ve heard Opera has {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} support, though I haven'{}t had time to test this myself, so I don'{}t know if it actually does - or, for that matter, if it does it `{}correctly'{}, or has the same problems as WebKit. But either way, WebKit is one of the first two implementations to ever attempt to support {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} (Microsoft'{}s unrelated {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char64font\char45face}} declaration notwithstanding) - I really don'{}t want to see it'{}s early mistakes carried on to FireFox in a few years, and then Internet Explorer a few decades after that. That will leave us stuck with this broken system forever, as it has been demonstrated time and time again that if nobody else supports an old standard correctly, a newcomer to the standard will not do it correctly either. I for one would really, really, hate that. + +In summary\ldots{} come on, WebKit team, this isn'{}t like you - you'{}re always the ones with the closest-to-standard implementation, and the cleanest code, and\ldots{} hell, overall? Webkit is the most secure/fastest browser available. But this is making me lose my faith in you, guys, please get it right. You'{}re pioneering a leap into the future when it comes to the Web - this is as important, or \emph{more} important, than Mosiac'{}s allowing of images was. + +To put it succinctly - don'{}t fuck this up, y'{}all. *** Output of to_md *** WebKit (Safari 3.1) and the CSS @font-face declarationI m a big fan of typography in general. If you check out my homepageor my diff --git a/vendor/plugins/maruku/spec/block_docs/syntax_hl.md b/vendor/plugins/maruku/spec/block_docs/syntax_hl.md index 7e6bfe8e..52d804c6 100644 --- a/vendor/plugins/maruku/spec/block_docs/syntax_hl.md +++ b/vendor/plugins/maruku/spec/block_docs/syntax_hl.md @@ -31,7 +31,7 @@ puts Maruku.new($stdin).to_html

        This is ruby code:

        -
        require 'maruku'
        +
        require 'maruku'
        puts Maruku.new($stdin).to_html
        *** Output of to_latex *** diff --git a/vendor/plugins/maruku/spec/block_docs/wrapping.md b/vendor/plugins/maruku/spec/block_docs/wrapping.md index 8b6c5333..b5d952d6 100644 --- a/vendor/plugins/maruku/spec/block_docs/wrapping.md +++ b/vendor/plugins/maruku/spec/block_docs/wrapping.md @@ -29,10 +29,10 @@ md_el(:document,[ ],{},[]) ],{},[]) *** Output of to_html *** -

        Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:
        Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.

        +

        Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:
        Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.

          -
        • Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:
          Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
        • +
        • Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:
          Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
        • Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet