Index: mapfile.c
===================================================================
--- mapfile.c	(revision 43645)
+++ mapfile.c	(working copy)
@@ -290,8 +290,7 @@
 
     /* if for non-Type3 font both ps_name and font file are missing,
        drop this entry */
-    if ((is_type1(fm) || is_truetype(fm) || is_opentype(fm))
-        && fm->ps_name == NULL && !is_fontfile(fm)) {
+    if (!is_type3(fm) && fm->ps_name == NULL && !is_fontfile(fm)) {
         if (warn)
             pdftex_warn
                 ("invalid entry for `%s': both ps_name and font file missing",
@@ -539,8 +538,15 @@
             set_opentype(fm);
         else
             set_type1(fm);
-    } else if (is_std_t1font(fm))
-        set_type1(fm);          /* assume a builtin font is Type1 */
+    } else {
+        if (is_std_t1font(fm)) {
+          set_type1(fm);          /* assume a builtin font is Type1 */
+        } else {
+          set_type3(fm);          /* otherwise font is Type3 */
+          if (fixedpkscalable)
+            set_scalt3font(fm);
+        }
+    }
     if (check_fm_entry(fm, true) != 0)
         goto bad_line;
     /*
@@ -624,6 +630,11 @@
     return pdffontmap[f] != (fmentryptr) dummy_fm_entry();
 }
 
+boolean isscalable(internalfontnumber f)
+{
+    return hasfmentry(f) && (!is_type3((fm_entry *)pdffontmap[f]) || is_scalt3font((fm_entry *)pdffontmap[f]));
+}
+
 /* check whether a map entry is valid for font replacement */
 
 static boolean fm_valid_for_font_replacement(fm_entry * fm)
Index: pdftex.defines
===================================================================
--- pdftex.defines	(revision 43645)
+++ pdftex.defines	(working copy)
@@ -38,6 +38,7 @@
 
 { functions from mapfile.c }
 @define function hasfmentry();
+@define function isscalable();
 @define procedure checkextfm();
 @define procedure pdfmapfile();
 @define procedure pdfmapline();
Index: pdftex.web
===================================================================
--- pdftex.web	(revision 43645)
+++ pdftex.web	(working copy)
@@ -5690,7 +5690,8 @@
 @d pdf_suppress_warning_page_group_code  = pdftex_first_integer_code + 29 {suppress warning about multiple pdfs with page group}
 @d pdf_info_omit_date_code  = pdftex_first_integer_code + 30 {omit generating CreationDate and ModDate}
 @d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 31 {suppress /PTEX.* entries in PDF dictionaries}
-@d pdf_int_pars=pdftex_first_integer_code + 32 {total number of \pdfTeX's integer parameters}
+@d pdf_pk_scalable_code      = pdftex_first_integer_code + 32 {set PK fonts in map lines as scalable}
+@d pdf_int_pars=pdftex_first_integer_code + 33 {total number of \pdfTeX's integer parameters}
 @#
 @d etex_int_base=pdf_int_pars {base for \eTeX's integer parameters}
 @d tracing_assigns_code=etex_int_base {show assignments}
@@ -5801,6 +5802,7 @@
 @d pdf_suppress_warning_page_group == int_par(pdf_suppress_warning_page_group_code)
 @d pdf_info_omit_date == int_par(pdf_info_omit_date_code)
 @d pdf_suppress_ptex_info == int_par(pdf_suppress_ptex_info_code)
+@d pdf_pk_scalable      == int_par(pdf_pk_scalable_code)
 @#
 @d tracing_assigns==int_par(tracing_assigns_code)
 @d tracing_groups==int_par(tracing_groups_code)
@@ -5908,6 +5910,7 @@
 pdf_suppress_warning_page_group_code:print_esc("pdfsuppresswarningpagegroup");
 pdf_info_omit_date_code:print_esc("pdfinfoomitdate");
 pdf_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo");
+pdf_pk_scalable_code:      print_esc("pdfpkscalable");
 @/@<Cases for |print_param|@>@/
 othercases print("[unknown integer parameter!]")
 endcases;
@@ -6099,6 +6102,9 @@
 primitive("pdfsuppressptexinfo",assign_int,int_base+pdf_suppress_ptex_info_code);@/
 @!@:pdf_suppress_ptex_info_}{\.{\\pdfsuppressptexinfo} primitive@>
 
+primitive("pdfpkscalable",assign_int,int_base+pdf_pk_scalable_code);@/
+@!@:pdf_pk_scalable_}{\.{\\pdfpkscalable} primitive@>
+
 @ @<Cases of |print_cmd_chr|...@>=
 assign_int: if chr_code<count_base then print_param(chr_code-int_base)
   else  begin print_esc("count"); print_int(chr_code-count_base);
@@ -15003,6 +15009,7 @@
 pdf_image_apply_gamma := 0;
 pdf_px_dimen := one_bp;
 pdf_draftmode := 0;
+pdf_pk_scalable := true;
 
 @ The subroutines define the corresponding macros so we can use them
 in C.
@@ -15731,7 +15738,7 @@
     s: integer;
 begin
     w := char_width(f)(char_info(f)(c));
-    if hasfmentry(f) then begin
+    if isscalable(f) then begin
         if pdf_cur_Tm_a = 0 then begin
             call_func(divide_scaled(w, pdf_font_size[f], 4));
             pdf_delta_h := pdf_delta_h + scaled_out;
@@ -15810,6 +15817,7 @@
 @!min_bp_val: scaled;
 @!min_font_val: scaled; {(TJ array system)}
 @!fixed_pk_resolution: integer;
+@!fixed_pk_scalable: boolean;
 @!fixed_decimal_digits: integer;
 @!fixed_gen_tounicode: integer;
 @!fixed_inclusion_copy_font: integer;
@@ -15942,7 +15950,7 @@
     {if |f| is auto expanded then ensure the base font is initialized}
     if pdf_font_auto_expand[f] and (pdf_font_blink[f] <> null_font) then begin
         b := pdf_font_blink[f];
-        if not hasfmentry(b) then
+        if not isscalable(b) then
             pdf_error("font expansion", "auto expansion is only possible with scalable fonts");
         if not font_used[b] then
             pdf_init_font(b);
@@ -15953,11 +15961,11 @@
     here: 1) |f| and |k| have the same tfm name (so they have been loaded at
     different sizes, eg 'cmr10' and 'cmr10 at 11pt'); 2) |f| has been auto
     expanded from |k|}
-    if hasfmentry(f) then begin
+    if isscalable(f) then begin
         i := head_tab[obj_type_font];
         while i <> 0 do begin
             k := obj_info(i);
-            if hasfmentry(k) and
+            if isscalable(k) and
                (pdf_font_map[k] = pdf_font_map[f]) and
                (str_eq_str(font_name[k], font_name[f]) or
                 (pdf_font_auto_expand[f] and
@@ -34924,6 +34932,7 @@
 begin
     check_pdfoutput("\pdfmapfile", true);
     scan_pdf_ext_toks;
+    fixed_pk_scalable := fix_int(pdf_pk_scalable, 0, 1);
     pdfmapfile(def_ref);
     delete_token_ref(def_ref);
 end
@@ -34932,6 +34941,7 @@
 begin
     check_pdfoutput("\pdfmapline", true);
     scan_pdf_ext_toks;
+    fixed_pk_scalable := fix_int(pdf_pk_scalable, 0, 1);
     pdfmapline(def_ref);
     delete_token_ref(def_ref);
 end
Index: ptexlib.h
===================================================================
--- ptexlib.h	(revision 43645)
+++ ptexlib.h	(working copy)
@@ -168,6 +168,7 @@
 
 /* mapfile.c */
 extern boolean hasfmentry(internalfontnumber);
+extern boolean isscalable(internalfontnumber);
 extern void fm_free(void);
 extern void fm_read_info(void);
 extern ff_entry *check_ff_exist(char *, boolean);
Index: ptexmac.h
===================================================================
--- ptexmac.h	(revision 43645)
+++ ptexmac.h	(working copy)
@@ -155,6 +155,8 @@
 #  define F_TYPE1             0x10
 #  define F_TRUETYPE          0x20
 #  define F_OTF               0x40
+#  define F_TYPE3             0x80
+#  define F_SCALT3FONT        0x0100
 
 #  define set_included(fm)    ((fm)->type |= F_INCLUDED)
 #  define set_subsetted(fm)   ((fm)->type |= F_SUBSETTED)
@@ -163,6 +165,8 @@
 #  define set_type1(fm)       ((fm)->type |= F_TYPE1)
 #  define set_truetype(fm)    ((fm)->type |= F_TRUETYPE)
 #  define set_opentype(fm)    ((fm)->type |= F_OTF)
+#  define set_type3(fm)       ((fm)->type |= F_TYPE3)
+#  define set_scalt3font(fm)  ((fm)->type |= F_SCALT3FONT)
 
 #  define unset_included(fm)  ((fm)->type &= ~F_INCLUDED)
 #  define unset_subsetted(fm) ((fm)->type &= ~F_SUBSETTED)
@@ -171,6 +175,8 @@
 #  define unset_type1(fm)     ((fm)->type &= ~F_TYPE1)
 #  define unset_truetype(fm)  ((fm)->type &= ~F_TRUETYPE)
 #  define unset_opentype(fm)  ((fm)->type &= ~F_OTF)
+#  define unset_type3(fm)     ((fm)->type &= ~F_TYPE3)
+#  define unset_scalt3font(fm)((fm)->type &= ~F_SCALT3FONT)
 
 #  define is_included(fm)     (((fm)->type & F_INCLUDED) != 0)
 #  define is_subsetted(fm)    (((fm)->type & F_SUBSETTED) != 0)
@@ -179,6 +185,8 @@
 #  define is_type1(fm)        (((fm)->type & F_TYPE1) != 0)
 #  define is_truetype(fm)     (((fm)->type & F_TRUETYPE) != 0)
 #  define is_opentype(fm)     (((fm)->type & F_OTF) != 0)
+#  define is_type3(fm)        (((fm)->type & F_TYPE3) != 0)
+#  define is_scalt3font(fm)   (((fm)->type & F_SCALT3FONT) != 0)
 
 #  define fm_slant(fm)        (fm)->slant
 #  define fm_extend(fm)       (fm)->extend
Index: writefont.c
===================================================================
--- writefont.c	(revision 43645)
+++ writefont.c	(working copy)
@@ -666,7 +666,7 @@
 {
     fm_entry *fm;
     fm = hasfmentry(f) ? (fm_entry *) pdffontmap[f] : NULL;
-    if (fm == NULL || (fm->ps_name == NULL && fm->ff_name == NULL))
+    if (fm == NULL || is_type3(fm) || (fm->ps_name == NULL && fm->ff_name == NULL))
         writet3(fm, font_objnum, f);
     else
         create_fontdictionary(fm, font_objnum, f);
