epitzer / gdipp

Automatically exported from code.google.com/p/gdipp
0 stars 0 forks source link

Word split problem #157

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Words seem to be split, for example the word "Wiki" becomes "Wik"-"i" (with a 
newline), when shown on the Windows Desktop.

Without gdipp, the text shows up as a single word on a single line.

I am using gdipp_x64_0.9.1.msi on Windows 7 Home Premium (+ Service Pack 1).

Screenshots:
1. icon+text on desktop (not selected)
2. icon+text on desktop (selected)
3. icon+editable text on desktop

Original issue reported on code.google.com by giorgos...@gmail.com on 5 Mar 2011 at 11:52

Attachments:

GoogleCodeExporter commented 9 years ago
Having the exact same problem, only way to fix it is by refreshing. But 
sometimes the world split is far worse, and the shadows get all messed up.

Any news on the problem?

Original comment by 8924th on 22 Jul 2011 at 11:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I tried the same, creating a desktop folder named “Wiki“ but I couldn’t 
reproduce the effect — using gdipp_x86_0.9.1 with Windows 7 Professional 
32bit.

Possible causes why I don’t experience this problem:

I’m not using Segoe UI as standard font but Bitstream Vera Sans.
I have changed my System dpi setting to the true value of my monitor that has a 
resolution of 93 dpi, changing the dpi setting directly in the registry. This 
was necessary because Microsoft decided that users are only allowed to choose 
dpi values larger than 96 dpi in the settings menu. That sucks if you want e.g. 
Word documents look the correct size at 100% zoom, they’re rendered too large 
with the standard 96 dpi setting.

Microsoft and their dpi/font rendering mess — tsk, tsk.

Maybe it’s because of different settings?

Here’s my gdipp settings file (I’ve inserted comments to all parameters for 
easier understanding and value ranges, for any user who doesn’t know e.g. 
what kerning is or what values are accepted by gdipp):

<?xml version="1.0" encoding="UTF-8" ?>
<gdipp>
    <version>0.9.1</version>
    <!--Abbreviations
    possible renderers:
    FreeType (FT)
    GetGlyphOutline (GGO)
    DirectWrite (DW)
    Windows Imaging Component (WIC) [http://en.wikipedia.org/wiki/Windows_Imaging_Component]
    -->
    <gdimm>
        <process>
            <freetype>
                <cache_max_faces>8</cache_max_faces>
                <cache_max_sizes>16</cache_max_sizes>
                <cache_max_bytes>1048576</cache_max_bytes>

                <!--
                lcd filter types, default: 1                
                available: 0,1,2,16 for FreeType renderer

                0 = no filtering,
                  in combination with subpixel rendering, strong color fringes.
                1 = default filter,
                  reduces color fringes at the cost of slight blurriness.
                2 = light filter,
                  less blurry than type 1, slightly stronger color fringes.
                16 = legacy filter, (obsolete)
                  corresponds to the orig. libXft color filter.
                  high contrast, very severe color fringes if glyphs are not well hinted.
                  Works only well if TrueType bytecode interpreter is enabled and high-quality hinted fonts are used.
        !-->
                <lcd_filter>1</lcd_filter>
            </freetype>
        </process>

        <font max_height="72">

            <!--auto hinting, default: 1
                available: 0,1,2 for FreeType renderer

                0 = auto hinting disabled
                1 = FreeType uses TrueType bytecode interpreter preceding auto hinting
                2 = FreeType always uses auto-hinting
                -->
            <auto_hinting>0</auto_hinting>

            <!--embedded bitmap, default: 0
             available: 0,1 for FreeType renderer
           0 = disable use of embedded bitmap in font file.
           1 = enable use of embedded bitmap in font file, glyph bitmaps are shown as-is.
          -->
            <embedded_bitmap>0</embedded_bitmap>

            <!--embolden, default: 0
            available: any integer, for FreeType and GetGlyphOutline
            weight adjustment of all text, positive integers emboldening text,
            negative values slimming text
            any value other than 0 requires additional computation time
            -->
            <embolden>0</embolden>

            <!--gamma, default: 1.0
            available: positive decimal values for all renderers
            gamma correction, WIC renderer uses average of all three channels as gamma.
          applied universally, cannot be bypassed
          >1.0 = overall darker glyphs, darkens dark regions stronger than bright regions
          <1.0 = overall brighter glyphs, lightens dark regions stronger than bright regions
           1.0 = no correction
          -->
            <gamma>
                <red>1.0</red>
                <green>1.0</green>
                <blue>1.0</blue>
            </gamma>

            <!--hinting, default: 1
            available: 0,1,2,3 for all renderers
            strength of hinting, hinting makes characters clear to read at the cost of transformed shapes
            0 = hinting disabled, blurs edges of characters but maintains their intended shapes
            1 = maximum antialiasing reached
            -->
            <hinting>0</hinting>

            <!--kerning, default: 0
            available: 0,1 for FreeType
            kerning is the process of adjusting the spacing between characters in a proportional font,
            usually to achieve a visually pleasing result. Kerning moves the letters closer together
            (negative spacing) vs. tracking which moves the letters further apart (positive spacing).
            [http://en.wikipedia.org/wiki/Kerning]
            0 = kerning deactivated, can produce more blurring or other “artifacts” with certain kerning pairs
            (e.g. W and e or V and A are closer together)
            WA VA We IP dK
            1 = kerning activated, according to MSDN DirectWrite always does kerning.
            -->
            <kerning>0</kerning>

            <!--render mode
            available: 0,1,2 for all renderers and modes
            mono, gray and subpixel determine how gdipp chooses the monochrome,
            gray-level and subpixel modes for glyph rendering.
            For each item:
            0 = render mode disabled
            1 = gdipp automatically chooses the most appropriate one according to DC color depth.
            2 = render mode enforced
            Similar to the selector nodes, these items are checked in order of mono -> gray -> subpixel.
            For each item, value 0 disables one render mode, and value 2 forces gdipp to use such mode.
            When set to 1, gdipp automatically chooses the most appropriate one according to DC color depth.
            Therefore, if multiple items are set to 2, the firstly checked setting is applied. -->
            <render_mode>
                <mono>1</mono>
                <gray>1</gray>
                <subpixel>1</subpixel>

                <!--pixel geometry, default: 0
              available: 0,1 for all renderers
              geometric arrangement of display subpixels.
              0 = RGB arrangement, usual arrangement for the vast majority of displays
              1 = BGR arrangement, very rare subpixel arrangement
              -->
                <pixel_geometry>0</pixel_geometry>

                <!--aliased text, default: 0
              available: 0,1 for all renderers
              The font whose quality is NONANTIALIASED_QUALITY is ignored by gdipp if set to 0. Otherwise, it is rendered according to the DC color depth. 
              -->
                <aliased_text>0</aliased_text>
            </render_mode>

            <!--renderer, default: 10
            available: 0,10,20,30,31 for all renderers
            chooses the renderer that is used to render fonts.
            Each main renderer type reserves 10 values for itself and 9 possible variations.
             0 = ClearType (no rendering).
            10 = FreeType
            20 = GetGlyphOutline API
            30 = DirectWrite
            31 = WIC renderer
            -->
            <renderer>10</renderer>

            <shadow>
              <!--shadow/offset, default: 1
              available: any integer for FreeType, GetGlyphOutline, DirectWrite
              Settings in the shadow node controls the effect of text shadow. offset_xxx settings indicate the horizontal offset and vertical offset of the shadow.
              Positive horizontal offset moves shadow right.
              Positive vertical offset move shadow down.
              -->
                <offset_x>1</offset_x>
                <offset_y>1</offset_y>

                <!--shadow/alpha, default: 0
              available:0-255 for FreeType, GetGlyphOutline, DirectWrite
              transparency of the text shadow.
                0 = shadow disabled
              255 = shadow fully opaque
              -->
                <alpha>0</alpha>
            </shadow>
        </font>

    <!--dunno why there’s a second renderer choice-->
        <font>
            <renderer>10</renderer>
        </font>
    </gdimm>

    <demo>
        <count>5000</count>
        <threads>2</threads>
        <random_text>0</random_text>
        <font>Arial</font>
        <font>Consolas</font>
        <font>Segoe UI</font>
        <font>Tahoma</font>
        <font>Verdana</font>
    </demo>

    <!--exclude
    gdipp excludes these processes from injecting or rendering. The process name is matched against regular expression. To specify multiple excluded processes, use multiple nodes.
    -->
    <exclude>
        <process>conhost\.exe</process>
        <process>dwm\.exe</process>
        <process>logonui\.exe</process>
        <process>service\.exe</process>
        <process>spoolsv\.exe</process>
        <process>svchost\.exe</process>
        <process>taskhost\.exe</process>
        <process>userinit\.exe</process>
        <process>werfault\.exe</process>
        <process>wininit\.exe</process>
        <process>winlogon\.exe</process>
        <process>neo\.exe</process>
        <process>thgw\.exe</process>
        <process>peg-solitaire\.exe</process>
        <process>ericprozess\.exe</process>
        <process>elster\.exe</process>
        <process>pica\.exe</process>
        <process>vidalia\.exe</process>
        <process>tor\.exe</process>
        <process>polipo\.exe</process>
        </exclude>
</gdipp>

Original comment by albedosh...@gmail.com on 27 Jul 2011 at 1:32

GoogleCodeExporter commented 9 years ago
Hi albedosh...@alcor.de, thanks for the detailed feedback!

The only things that differ between my settings and yours are the following:
* auto_hinting is 1
* hinting is 1
* render_mode\mono is 1
* in the second renderer, font\renderer is 0
* the following files are not excluded:
<process>thgw\.exe</process>
<process>peg-solitaire\.exe</process>
<process>ericprozess\.exe</process>
<process>elster\.exe</process>
<process>pica\.exe</process>
<process>vidalia\.exe</process>
<process>tor\.exe</process>
<process>polipo\.exe</process>

I suspect that the problem has to do with the hinting flags - unfortunately I 
can't edit the gdipp_setting.xml file, Notepad reports that "Access is denied" 
(stopping the 32-bit/64-bit services doesn't help). 

Original comment by giorgos...@gmail.com on 27 Jul 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Hello, giorgos!

I have also set render mode mono to 1:

<render_mode>
                <mono>1</mono>
                <gray>1</gray>
                <subpixel>1</subpixel>

This way gdipp automatically chooses the appropriat mode according to the color 
depth.

The excluded files were added by me manually because some programs don’t 
‘like’ gdipp.

I deactivated hinting because I that’s one of the main reasons (for me) for 
using gdipp and what makes gdipp rendering (FreeType) superior to ClearType.

If you want to edit the gdipp xml settings file (I suspect your folder is in 
the ‘program files’ folder) you need administrator privileges. Just run 
your text editor as administrator. You don’t need to stop the services for 
editing the settings.

If you want to check the effect of your changes immediately without having to 
stop and then start the process manually by running the two batch files just 
create a new batch file in the ‘Scripts’ subfolder and copy and paste the 
following lines into it:

for 32 bit systems:

-------------------------------------copy text below this line
sc stop gdipp_svc_32

ping -n 3 -w 1 localhost > NUL

sc start gdipp_svc_32

ping -n 3 -w 1 localhost > NUL
-------------------------------------and above this line

for 64 bit systems:

-------------------------------------copy text below this line
sc stop gdipp_svc_64

ping -n 3 -w 1 localhost > NUL

sc start gdipp_svc_64

ping -n 3 -w 1 localhost > NUL
-------------------------------------and above this line

This is just a combination of the two batch files for stopping and 
(re-)starting the process. Create a link to the batch file on your desktop and 
start it as an administrator. So you can change your settings in a text editor 
and watch the effect of the changes in a matter of seconds. If you don’t like 
what you see, then just change the settings file, save it by pressing 
“Ctrl-s” and run the batch file again, and so on.

Maybe setting the second renderer node to the same value as the first one 
helps, I don’t know. I did this and it doesn’t at least do any harm.

Original comment by albedosh...@gmail.com on 28 Jul 2011 at 12:54

GoogleCodeExporter commented 9 years ago
Oh, by the way, you should try if setting the kerning to 0 solves the problem. 
Kerning doesn’t seem to work well at the moment, at least with some fonts.

Greetings,

albedo

Original comment by albedosh...@gmail.com on 28 Jul 2011 at 12:59

GoogleCodeExporter commented 9 years ago
I could reproduce the problem, finally!

After changing the lcd_filter from ‘1’ to ‘2’ the text of one of my 
desktop links showed the same behavior. So changing it back to ‘1’ might 
help. You could also try to change the renderer to ‘20’ (GetGlyphOutline). 
This renderer has less parameters but if your problem really hurts you you 
could try that out.

Now I’m out of any further ideas :)

-- albedo

Original comment by albedosh...@gmail.com on 28 Jul 2011 at 8:15

GoogleCodeExporter commented 9 years ago
I changed render_mode\mono to 0 and now everything seems OK (but I am not sure 
I understood why it works). Thanks for the help!

Original comment by giorgos...@gmail.com on 12 Sep 2011 at 1:24