On Fri, 22 Mar 2013, David Greenaway wrote:

 PATCH 2: When determining how long a string of spaces is, use
          'width(" ") * n' instead of 'width("mix") * n / 3'.

That was actually a regression -- the " " measurement was there before I made the "mix"-based unit, to get better results for exotic font spacing, but I've forgotten to upgrade the blanks measure; see a981a5c8a505.


 PATCH 3: When measuring strings, use "Font.getStringBounds" instead
          of "FontMetrics.stringWidth". The latter doesn't take into
          account anti-aliasing or kerning, while the former is what
          is actually used when rendering the strings to the screen.

That seems to be the most important point here. It requires some further investigation how jEdit measures things in general, so see if it agrees with the actual painting. There might be some deeper problem of Graphics2D painting vs. font metrics here, that needs to be investigated.

If you can tell more, pointing to sources by the jEdit guys or Oracle, I will listen attentively.


the ScalaDoc style guides [1]

could be a little more concrete on where I went wrong, I would be happy
to reformat the patches.

 [1]: http://docs.scala-lang.org/style/scaladoc.html

This one does not apply to Isabelle/Scala sources. ScalaDoc is no universal standard, and it does not lead to well-document sources. You can see the results of some decades of JavaDoc practice when you look through the main JDK sources, which I am occasionally forced to do.

General Scala coding style is still an open question, and Isabelle/Scala has its own style inherited from Isabelle/ML.


I would imagine it must be quite frustrating when upstream maintainers refuse to accept community contributions.

No, I am just a bit more realistic about how software development processes work. There are no universal principles of "community contributions", but the process somehow determins the quality of the result. Have you ever tried to submit patches to the Linux kernel?

Concerning jEdit development, I am in fact more worried about people messing things up by contributed patches. My patch got accepted, because nobody had a real clue, and I was persistent enough to pretend that it was the right thing -- German keyboard input on Mac OS X with Java 7.

It certainly was right for our situation of cross-platform Isabelle/jEdit with Java 7, but might cause issues with more obscure legacy configurations of someone else somewhere. This is also the reason why I now wait and see, instead of posting a few more jEdit patches that I have in the pipeline.


        Makarius
_______________________________________________
isabelle-dev mailing list
isabelle-...@in.tum.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev

Reply via email to