Front End 2019

John Fultz
Wolfram Research, Inc.

HiDPI support — explained

Our historical assumption has been a pixel is 1/72 inch

Overscript[Overscript[Graphics[{Line[Join[Table[{{i, 1}, {i, 2}}, {i, 0, 72}],Table[{{i, 1}, {i, 3}}, {i, 0, 72,9}],Table[{{i, 1}, {i, 4}}, {i, 0, 72,18}],Table[{{i, 1}, {i, 5}}, {i, 0, 72,36}]]]}],RawBoxes@"⏞"],Style["1 inch – 72 pixels","Subsubsection"]]

HiDPI support — explained

A 1” x 1” pixel grid, 72 pixels on a side

Graphics[{Line[Join[Table[{{i, 1}, {i, 2}}, {i, 0, 72}],Table[{{i, 1}, {i, 3}}, {i, 0, 72,9}],Table[{{i, 1}, {i, 4}}, {i, 0, 72,18}],Table[{{i, 1}, {i, 5}}, {i, 0, 72,36}],
Table[{{-1,i}, {-2,i}}, {i, -72,0}],Table[{{-1,i}, {-3,i}}, {i, -72,0,9}],Table[{{-1,i}, {-4,i}}, {i, -72,0,18}],Table[{{-1,i}, {-5,i}}, {i, -72,0,36}]]],
Opacity[.2,Blue],Line[Join[Table[{{i, 0}, {i, -72}}, {i, 0, 72}],Table[{{0,j},{72,j}},{j,-72,0}]]]}]

HiDPI support — explained

Zoomed in, a (1/6)” x (1/6)” pixel grid, 12 pixels on a side

Graphics[{
Opacity[.4,Blue],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0, 12}],Table[{{0,j},{12,j}},{j,-12,0}]]]}]

HiDPI support — explained

Retina doubled the number of pixels in each dimension

A (1/6)” x (1/6)” pixel grid is now 24 pixels on a side

Graphics[{
Opacity[.4,Blue],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0, 12}],Table[{{0,j},{12,j}},{j,-12,0}]]],
Opacity[.6,Green],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0.5, 11.5}],Table[{{0,j},{12,j}},{j,-11.5,-0.5}]]]}]

HiDPI support — history

Meanwhile, Windows has been telling us since 1995 that our screens were 96dpi

Panel[Grid[{{"Windows said:","Mac said:","Mathematica said:"},{Style["96 dpi",50],Style["72 dpi",50],Style["72 dpi",50]}}],BaseStyle->24]

HiDPI support — history

Panel[Grid[{{
Style["State of affairs, 1996",40],,,},
{"Windows said:","Mac said:","Mathematica said:",TextCell@"Typical monitors"},{Style["96 dpi",50,Red],Style["72 dpi",50,Green],Style["72 dpi",50,Green],Style["72 dpi",50]}}],BaseStyle->24]

HiDPI support — history

Panel[Grid[{{
Style["State of affairs, 2019, Version 12",40],,,},
{"Windows said:","Mac said:","Mathematica said:",TextCell@"Typical lo\[Hyphen]res monitors"},{Style["96 dpi",50,Green],Style["72 dpi",50,Red],Style["72 dpi",50,Red],Style["96 dpi",50]}}],BaseStyle->24]

HiDPI support — today

Panel[Grid[{{
Style["State of affairs, 2019, Version 12.1",40],,,},
{"Windows says:","Mac says:","Mathematica says:",TextCell@"Typical lo\[Hyphen]res monitors"},{Style["96 dpi",50,Green],Style["72 dpi",50,Red],Style[TextCell@"trust the OS",50],Style["96 dpi",50]}}],BaseStyle->24]

HiDPI support — implications

On Windows, we now have a 96dpi resolution at “100% scaling”, and other %age scaling values are relative to 96dpi

Graphics[{
Opacity[.5,Blue],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0, 12}],Table[{{0,j},{12,j}},{j,-12,0}]]],
Opacity[.7,Green],Line[Join[Table[{{i, 0}, {i, -12}}, {i,0,12,.75}],Table[{{0,j},{12,j}},{j,-12,0,.75}]]]}]

HiDPI support — implications

This means that a measurement like “12 points” uses a different number of pixels

Graphics[{FontSize->20,FontWeight->Bold,
Inset["12.0\n72 dpi\n12 points",{6,5}],
Inset["12.1\n96 dpi\n12 points",{24,5}],
Opacity[.5,Blue],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0, 12}],Table[{{0,j},{12,j}},{j,-12,0}]]],
Opacity[.7,Green],Line[Join[Table[{{i+16, 0}, {i+16, -16}}, {i,0,16}],Table[{{16,j},{32,j}},{j,-16,0}]]]}]

HiDPI support — implications

Fonts will look larger under Windows (experiences differ under Linux), but now identical to all other apps

Graphics[{FontSize->20,FontWeight->Bold,
Inset["12.0\n72 dpi\n12 points",{6,5}],
Inset["12.1\n96 dpi\n12 points",{24,5}],
PointSize[.02],Point[Join[
Table[{1,i},{i,-12,-1}],
Table[{10,i},{i,-12,-1}],
Table[{2+i,-2-i},{i,0,3}],
Table[{9-i,-2-i},{i,0,3}],
Table[{17,i},{i,-16,-1}],
Table[{30,i},{i,-16,-1}],
Table[{18+i,-2-i},{i,0,5}],
Table[{29-i,-2-i},{i,0,5}]
]+.5],
Opacity[.5,Blue],Line[Join[Table[{{i, 0}, {i, -12}}, {i, 0, 12}],Table[{{0,j},{12,j}},{j,-12,0}]]],
Opacity[.7,Green],Line[Join[Table[{{i+16, 0}, {i+16, -16}}, {i,0,16}],Table[{{16,j},{32,j}},{j,-16,0}]]]}]

If you’re running a lo-res monitor, we’ll maintain 72dpi so as not to be jarring. Controllable with the ScreenResolutionCompatibilityMode option. But if you have your scale set to anything other than 100%, welcome to the modern world!

HiDPI support — points, not pixels

Everything else gets larger, too; things that are measured in points:

Panel@Labeled[Multicolumn[{FontSize,
WindowSize,
WindowMargins,
ImageSize,
ImageMargins,
ImagePadding,
FrameMargins,
AbsoluteThickness,
AbsolutePointSize,
AbsoluteDashing,
HoldForm@CurrentValue["MousePosition"],
Offset},BaseStyle->{"StandardForm",20,ShowStringCharacters->True},Frame->All,FrameStyle->Lighter[Gray]],TextCell["and many cell options, too","Text",Italic]]

HiDPI support — points, not pixels

Surface Book 2, version 12

SystemInformation["Devices","ScreenInformation"]

Same hardware, version 12.1

SystemInformation["Devices","ScreenInformation"]

CurrentValue["ConnectedDisplays"]

HiDPI support — affected functionality

Things on their way out:

Grid[{{,Column[{PixelConstrained,RasterSize}]}}]

Things still under construction in the 12.1 beta:

Grid[{{,Column[{Image,Rasterize}]}}]

New 3D rendering engines

Metal for macOS (upgraded from OpenGL 4.1)

Direct3D 11 for Windows (upgraded from Direct3D 9)

Yuzhu Lu will be giving more information this afternoon at 2pm in this room

Wolfram|Alpha mode notebooks

We have the product Wolfram|Alpha Notebook Edition

Notebooks created in either product work in the other

Just another flavor of standard Wolfram notebooks

Wolfram|Alpha mode notebooks

We have the product Wolfram|Alpha Notebook Edition

Notebooks created in either product work in the other

Just another flavor of standard Wolfram notebooks

More about Wolfram|Alpha Notebook Edition

Tomorrow, 4-4:30, presentation by Ashley Brozenac & Kelvin Mischo

Tomorrow, 4:30-6, training session by Ashley Brozenac & Kelvin Mischo

More from Lou D’Andria

Thursday, 4pm, “Understanding Manipulate”

Fuzzy completions

Completions modeled after those you see in modern editors such as Sublime and VS Code

Fuzzy completions

Completions modeled after those you see in modern editors such as Sublime and VS Code

Some guidelines...

Letters which are capitalized match strongly

Letters which are together match strongly

Like regular completions, popular symbols weight over less popular ones

Hyperlink interface

Inline hyperlink editing

Supports links in-product, to other notebooks, and to the web

Auto-hyperlink detection