diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/FastRGridExternalLookup.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/FastRGridExternalLookup.java
index beb97cd30e1db39d6818bdc9726038447d2d9bd8..55292b2447aa975e55d9c867eddb485239594d69 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/FastRGridExternalLookup.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/FastRGridExternalLookup.java
@@ -31,6 +31,7 @@ import com.oracle.truffle.r.library.fastrGrid.grDevices.DevCairo;
 import com.oracle.truffle.r.library.fastrGrid.grDevices.DevCurr;
 import com.oracle.truffle.r.library.fastrGrid.grDevices.DevHoldFlush;
 import com.oracle.truffle.r.library.fastrGrid.grDevices.DevOff;
+import com.oracle.truffle.r.library.fastrGrid.grDevices.DevSize;
 import com.oracle.truffle.r.library.fastrGrid.grDevices.InitWindowedDevice;
 import com.oracle.truffle.r.library.fastrGrid.grDevices.SavePlot;
 import com.oracle.truffle.r.library.fastrGrid.graphics.CPar;
@@ -55,6 +56,8 @@ public final class FastRGridExternalLookup {
         switch (name) {
             case "devholdflush":
                 return DevHoldFlush.create();
+            case "devsize":
+                return new DevSize();
             case "devcur":
                 return new DevCurr();
             case "devoff":
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/DevSize.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/DevSize.java
new file mode 100644
index 0000000000000000000000000000000000000000..0ae8b39372b58272c55df52cf232df8a1eb0eb37
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/DevSize.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.truffle.r.library.fastrGrid.grDevices;
+
+import static com.oracle.truffle.r.library.fastrGrid.device.DrawingContext.INCH_TO_POINTS_FACTOR;
+
+import com.oracle.truffle.r.library.fastrGrid.GridContext;
+import com.oracle.truffle.r.library.fastrGrid.device.GridDevice;
+import com.oracle.truffle.r.nodes.builtin.RExternalBuiltinNode;
+import com.oracle.truffle.r.runtime.data.RDataFactory;
+import com.oracle.truffle.r.runtime.data.RDoubleVector;
+
+/**
+ * Unlike {@link com.oracle.truffle.r.library.fastrGrid.graphics.CPar} with argument {@code din},
+ * which returns the size in inches, {@code dev.size} returns the size in pixels.
+ */
+public final class DevSize extends RExternalBuiltinNode.Arg0 {
+    static {
+        Casts.noCasts(DevSize.class);
+    }
+
+    @Override
+    public RDoubleVector execute() {
+        GridDevice dev = GridContext.getContext().getCurrentDevice();
+        double width = dev.getWidth() * INCH_TO_POINTS_FACTOR;
+        double height = dev.getHeight() * INCH_TO_POINTS_FACTOR;
+        return RDataFactory.createDoubleVector(new double[]{width, height}, RDataFactory.COMPLETE_VECTOR);
+    }
+}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/CPar.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/CPar.java
index 2f19eafd4df206506301bb1ea24fca902eaaa1b1..29936641ce22710b12d7ee374a2deb99873233bf 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/CPar.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/CPar.java
@@ -22,8 +22,13 @@
  */
 package com.oracle.truffle.r.library.fastrGrid.graphics;
 
+import static com.oracle.truffle.r.library.fastrGrid.device.DrawingContext.INCH_TO_POINTS_FACTOR;
+
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
+import com.oracle.truffle.api.frame.VirtualFrame;
+import com.oracle.truffle.r.library.fastrGrid.GPar;
 import com.oracle.truffle.r.library.fastrGrid.GridContext;
+import com.oracle.truffle.r.library.fastrGrid.device.DrawingContext;
 import com.oracle.truffle.r.library.fastrGrid.device.GridDevice;
 import com.oracle.truffle.r.nodes.builtin.RExternalBuiltinNode;
 import com.oracle.truffle.r.runtime.RError;
@@ -73,8 +78,30 @@ public final class CPar extends RExternalBuiltinNode {
         switch (name) {
             case "din":
                 return RDataFactory.createDoubleVector(new double[]{device.getWidth(), device.getHeight()}, RDataFactory.COMPLETE_VECTOR);
+            case "cin":
+                /*
+                 * character size ‘(width, height)’ in inches. These are the same measurements as ‘cra’, expressed
+                 * in different units.
+                 *
+                 * Note: cin/cra is used in dev.size() to figure out the conversion ratio between pixels and inches.
+                 * For the time being what is important is to choose the values to keep this ratio!
+                 */
+                double cin = getCurrentDrawingContext().getFontSize() / INCH_TO_POINTS_FACTOR;
+                return RDataFactory.createDoubleVector(new double[]{cin, cin}, RDataFactory.COMPLETE_VECTOR);
+            case "cra":
+                /*
+                 * size of default character ‘(width, height)’ in ‘rasters’ (pixels). Some devices have no concept
+                 * of pixels and so assume an arbitrary pixel size, usually 1/72 inch. These are the same
+                 * measurements as ‘cin’, expressed in different units.
+                 */
+                double cra = getCurrentDrawingContext().getFontSize();
+                return RDataFactory.createDoubleVector(new double[]{cra, cra}, RDataFactory.COMPLETE_VECTOR);
             default:
                 throw RError.nyi(RError.NO_CALLER, "C_Par parameter '" + name + "'");
         }
     }
+
+    private static DrawingContext getCurrentDrawingContext() {
+        return GPar.create(GridContext.getContext().getGridState().getGpar()).getDrawingContext(0);
+    }
 }