• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Font used for printing web page (Opera 12.17)

    Opera for Windows
    2
    5
    1105
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wpcoe
      wpcoe last edited by

      I've never noticed this before, but when I print a web page I wrote, it doesn't print in the same font it displays with. The relevant CSS element is simply "body {font-family: sans-serif; background-color:#fff980;}" and the web page displays in Opera with what looks like Arial, but when I print the page (or even Print Preview) it uses a serif font (looks like Times New Roman?)

      How can I specify within Opera and/or within the CSS style sheet to use the same sans-serif font when printing?

      Reply Quote 0
        1 Reply Last reply
      • A Former User
        A Former User last edited by

        If you don't specify a specific font in the page coding, the browser will use its fallback default font for display and for printing.
        The default display font can be changed under Tools>Preferences>Advanced>Fonts, but I'm not sure about the printing fonts.
        Try putting "font-family: Arial, sans-serif;" in the CSS, if you want it to always display in Arial, and see if it then prints in Arial too.
        🙂

        Reply Quote 0
          1 Reply Last reply
        • wpcoe
          wpcoe last edited by

          I found the problem: user error, as usual.

          In the link to the CSS style sheet in the document header, for some reason, included a reference to screen:

          link rel="stylesheet" href="styles.css" type="text/css" media="screen"

          That apparently applies everything in the stylesheet to just the screen view, and not to print output, which makes sense. WIth that screen reference and lacking a separate stylesheet for print output, the default Opera font is serif. When I remove the media="screen" from the link, it works as I wanted/expected.

          Sorry for the bother!

          Reply Quote 0
            1 Reply Last reply
          • wpcoe
            wpcoe last edited by

            (Is there a way to edit the thread title to add the word "SOLVED"?)

            Reply Quote 0
              1 Reply Last reply
            • A Former User
              A Former User last edited by

              I don't think there is, unless the mods can do it, but glad you solved it!
              🙂

              Reply Quote 0
                1 Reply Last reply
              • First post
                Last post

              Computer browsers

              • Opera for Windows
              • Opera for Mac
              • Opera for Linux
              • Opera beta version
              • Opera USB

              Mobile browsers

              • Opera for Android
              • Opera Mini
              • Opera Touch
              • Opera for basic phones

              • Add-ons
              • Opera account
              • Wallpapers
              • Opera Ads

              • Help & support
              • Opera blogs
              • Opera forums
              • Dev.Opera

              • Security
              • Privacy
              • Cookies Policy
              • EULA
              • Terms of Service

              • About Opera
              • Press info
              • Jobs
              • Investors
              • Become a partner
              • Contact us

              Follow Opera

              • Opera - Facebook
              • Opera - Twitter
              • Opera - YouTube
              • Opera - LinkedIn
              • Opera - Instagram

              © Opera Software 1995-