pango_cairo_layout_path method does not respect kerning - gtk#

I'm using pango library to do some text layout and cairo backend for rendering. It seems to me that the pango_cairo_layout_path method does not respect kerning.
I'm using c# bindings for pango and cairo that are provided with the gtk# project. Also i'm using the pango-cairo runtimes that also provided with gtk# project.
Here is an image demonstrating the problem (Font: Arial)
First row is from Inkscape rendering and second row from pango-cairo
Is there any known bug in pango/cairo?... or i'm doing something wrong
Do you know any work around...
Thanks in advance

It seems that pango-cairo backend in Windows by default uses the Win32 font type. With this type I had problems with kerning.
When I changed font type to be freetype everything worked as should.
In order to change font type please use:
PangoCairoFontMap * pango_cairo_font_map_new_for_font_type(cairo_font_type_t fonttype);
And
pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap);
More info here: https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html

Related

How to resize image file on Xamarin.forms. (+ writeableBitmap package can't be added)

I'm making iOS and Android app using with Xamarin.forms. (PCL project)
I need to resize my image file from 'MediaFile class' that is returned from 'CrossMedia.Current.PickPhotoAsync ()'.
What's your best way to do it?
and I have searched long time and noticed that many people uses 'writeableBitmap'.
But this 'writeableBitmap' nuget package can not be added because Xamarin platform is updated?
I got great answer from here.
https://forums.xamarin.com/discussion/comment/199212#Comment_199212
It's using DependencyService and it works beautifully.
After applied DependencyService, I got a question.
In my thinking, image file is not dependent so why don't we process it just in 'forms' using with SOME image process library in .net? (I'm not a .net developer but I believe that there is many library to process image file)
I suspect that we should have done because we want to use built-in image processing library(like UIKit) so that we could avoid adding new one?
Am I correct?

Qt: Alternative to qgraphicsdropshadoweffect

Is there a way to create shadow like qgraphicsdropshadoweffect? Because the qgraphicsdropshadoweffect have great impact on PC performance. I tried set boarder radius (stylesheet) but it doesnt look good. Im creating a multiple buttons on a stackwidget and each of it has qgraphicsdropshadoweffect like you guys see on a POS (especially on food). Im using qt 4.7.3.
Edit: Or perhaps a stylesheet that looks like it. But in qt4.7 I cannot use css3. Upgrading to qt 5.0 is not advisable in our situation.

Monodroid Layout Folder support

I'd like to use qualifiers on my layout folders as per the android documentation, but the designer in VS doesn't seem to support them. For example layout-w600dp doesn't get sent to the emulator; the default axml file from the layout folder is used.
Does anyone know if these settings are supported in Monodroid? If so, how do you make them take effect?
I think w600dp requires a certain api level to work - maybe 3.2 - see http://android-developers.blogspot.co.uk/2011/07/new-tools-for-managing-screen-sizes.html

Monodroid Custom UI controls

I want to know where I can get access to the NinePatch images specifically for Monodroid. I want to change the default coloring from blue to orange (if I was doing this in Java it would already be orange).
All I need is to change an edittext so that it's default colors are different. I have seen
http://www.androidworks.com/changing-the-android-edittext-ui-widget
which is really helpful but only as far as vanilla Android is concerned. I tried following the instructions, but I found the standard orange java images, not the Mono ones, which are blue.
Minimum framework is 2.2. I know that I am getting the java images because when I go to C:\Android\android-sdk\platforms there is no android-2.2 folder.
I'm not really sure what you are referring to. Mono for Android does not ship any NinePatch images. Mono for Android simply provides a thin binding over the Java API, it does not do anything custom.
Maybe it is triggered by changing your Android target framework?
I found my answer - and thank goodnesss it did not involve changing the 9Patches!
You can make an xml in the drawable folder which describes your button, textbox, etc. and make a selector with a solid tag, pressed event, etc. (http://developer.android.com/guide/topics/resources/drawable-resource.html)
Then you can set up the colors as a constant set in the Values folder and boom! Solution!

Why doesn't my CID (type 11) font work in GS8.61 on Windows

I have a customer in Macau that uses Windows EUDC for custom Big5 glyphs. I used Fontforge on Linux to convert the .TTE into a type 11 (CID type 2) font and created a custom CMap to map the Big5 code points to the correct glyph in the font. This all works fine and dandy in GS8.60 on Windows and GS8.61 - GS8.63 on Linux. When loading the font in GS8.61 on Windows I get a
/rangecheck error in /findfont in gs_cidfn.ps.
I've tried to use the EUDC.TTE font natively in ghostscript through the cidfmap with no luck, /invalidfont in /findfont. I'm hesitant to try to contact Ken Lunde, as this appears to be a problem specific to ghostscript. Does anybody know a workaround? Has anybody developed a patch so that I'm not reinventing the wheel here?
Edit: The /rangecheck error occurs in the .buildcidfont procedure. The .buildcidfont procedure has not changed from 8.60 to 8.61.
This seems to be resolved in GS8.63. Upgrading the client from 8.61 to 8.63 resolves this issue.

Resources