Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No text visible from svg files viewed from 'svgviewer' example.
QtWS25 Last Chance

No text visible from svg files viewed from 'svgviewer' example.

Scheduled Pinned Locked Moved General and Desktop
10 Posts 3 Posters 4.5k Views
  • 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.
  • U Offline
    U Offline
    Udayaravi
    wrote on last edited by
    #1

    hi,
    I used the 'svgviewer' project given in 'Qt/examples' to view svg files.
    But it does not shows any text involved in the image. we can view only lines and curves but not text!

    please help me how to make text visible.
    I think there may be some font related problems because the svg images containing some UTF fonts...

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      QtSVG module only implements SVGTiny specification, not full SVG specs, which is why it's deprecated.

      If you need full SVG support, use QtWebKit, or some third-party library.

      (Z(:^

      1 Reply Last reply
      0
      • U Offline
        U Offline
        Udayaravi
        wrote on last edited by
        #3

        any solutions to add UTF font family into svgview?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          I don't know, I'm not using this module at all. You can always add a QLabel on top of it, but that is not really a good solution.

          (Z(:^

          1 Reply Last reply
          0
          • raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            [quote author="Udayaravi" date="1381391412"]any solutions to add UTF font family into svgview?[/quote]
            yes implement it into QtSvg module...
            As sierdzio said, it's not implemented there. Thus you would need to use some alternative if you depend on it!

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • U Offline
              U Offline
              Udayaravi
              wrote on last edited by
              #6

              Thanks for the quick reply,

              but please give more details how to implement it in Qtsvg module,
              because I am new to Qt programming.

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                [quote author="Udayaravi" date="1381391675"]because I am new to Qt programming.[/quote]

                Don't bother yourself, then. It's not an easy task. You would need to analyse the source code for QtSVG, locate where the problem lies, then implement text support (with correct glyph painting, positioning etc), provide unit tests, submit it to qt-project for review (if you want it included in mainline Qt), and then integrate it once the sanity test and all reviews are done.

                (Z(:^

                1 Reply Last reply
                0
                • raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #8

                  [quote author="Udayaravi" date="1381391675"]
                  but please give more details how to implement it in Qtsvg module,
                  because I am new to Qt programming.[/quote]

                  in addition to sierdzio:
                  If it would be a work that a Qt beginner could manage to implement, why shouldn't it be available yet?!

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    Udayaravi
                    wrote on last edited by
                    #9

                    Thanx sierdzio: for giving more details,
                    Then I can not find any solution for it!!!
                    Now I got it, why I was getting some error messages in the output window of the Qt Creator, like,
                    link glyph1-8 hasn't been detected!
                    link glyph1-6 hasn't been detected!
                    link glyph1-7 hasn't been detected!
                    link glyph1-1 hasn't been detected!....

                    Actually I was developing a gui tool, in which some svg outputs was required. I don't know what to do now?
                    Please suggest Any alternatives...

                    1 Reply Last reply
                    0
                    • raven-worxR Offline
                      raven-worxR Offline
                      raven-worx
                      Moderators
                      wrote on last edited by
                      #10

                      [quote author="Udayaravi" date="1381398107"]
                      Please suggest Any alternatives...
                      [/quote]
                      As sierdzio said:
                      use an external lib for SVG rendering. Such as "LibRsvg":https://wiki.gnome.org/LibRsvg
                      But i think this will probably rise new problems for a beginner...

                      or QtWebkit if possible.

                      Depending how you want to use the rendered svg in your application.

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved