Also, add a `convert-bounds-padding` parameter that defaults to adding
3 units (= pixels, usually) on each side of a pict when converting
to a format that supports padding.
Combined with changes to Scribble to use the new formatting, the
extra padding solves the long-standing problem of rendering picts
and having an edge (especially the bottom and right) cut off due
to rounding effects. For example, see `file-icon` in section 7.1 of
the `pict` documentation.
The choice of 3 pixels is more or less arbitrary; it covers the
case of edge pixels and italic fonts for typical font sizes, but
it obviously won't cover all drawing outside of a bounding box,
as for the documentation example `(desktop-machine 1 '(devil plt))`.
The 'pfd-bytes+bounds8 format can add extra padding around the image,
and the result reports the amount of added padding. This padding can
be used to include image output that it outside of the conceptual
bounding box, such as an italic glyph that extends beyond its
character's width.
This adds a new back-end pipeline for generating pdf to
scribble, with the hope that included picts (e.g., those
generated by Redex) will look better when viewed with
on-screen pdf viewers
Current problem: the descent adjustment is messed up,
as can be seen by this example program's output:
#lang scribble/base
@(require redex/pict
pict
redex/reduction-semantics)
@title{}
@(define-language L
(e ::= (e e) x (λ (x) e)))
@(render-language L)
ff@(text "f" '(italic . roman) 20)ff
x@(text "x")y@(text "y")
For the case that a larger buffer is needed than provided for
a read, decoding should make progress as long as some bytes are
converted.
Closes PR 14607
This establishes a communication channel between the
contract system and TR. TR normally can't track the
relationship between the identifier bound to the transformer
that produces the lifted value expression (which has the
type in the environment) and the lifted expression
itself.
This also adds properties that indicate which parts are
lifted expressions and if a function has an extra negative
party argument.
Finally, the expansion of keyword arguments is modified
slightly to propagate syntax properties on function argument
syntax to the let-bound identifiers that the keyword application
generates.
Explain better that regexp values can be used more efficiently
than strings or byte strings as patterns.
Adjust all examples to use regexp values instead of strings.
Merging base languages didn't add non-terminals that are included only
in the extension.
Also, add `extend-language-show-extended-order` for showing productions in
the order of an extended language instead of the original language.
Using select() to check whether a pipe is ready for writing seems to
fail on Mac OS X 10.8 and 10.9. See the PR for a small C program to
demonstrate. It's possible that the small program is broken and
there's no bug, but the program works on Linux and on Mac OS X 10.7
and 10.6.
Although poll() seems to work, switching completely to poll() is not a
good option on Mac OS X, since poll() does not support devices on that
platform.
The kqueue() facility seems to handle pipes and writing ok, so work
around the bug by enabling the use of kqueue() on pipes.
Closes PR 14596
Show the content of the buffer and the content of the temporary buffer
used to predict the size; then, I should be able to track down the
source of a mismatch.
The beginning of the "Inside" documentation was still geared toward
writing extensions or embedding Racket, which almost no one does any
more. Shuffle and change the beginning to orient it around the
foreign-function interface, instead.
This also applies to `(mlist x ...)`, even though
that involves two traversals when only one is
required by the old method. Timing suggests that
the new code is nonetheless faster.
This is the third try to fix the bug exposed by "fuzz.rkt". Previous
repairs addressed a symptom at the point of printing bad symbols,
instead of the cause at a failure to validate a symbol's encoding
when reading bytecode. This one fixes reading.
Commit 6a5a3037b4 was not quite right, because it used sightly the
wrong variant among a dozen decoding functions. The test suite caught
the problem, but I forgot to run it before pushing.
Also, repair the "Inside" documentation on the function that was
incorrectly used, and document the new variant.