This project has moved. For the latest updates, please go here.

TextInterlineSpacing

Mar 1, 2016 at 2:09 PM
I wonder if someone might be able to help me. I am struggling with trying to get TextInterlineSpacing to function. So far when I run the code, everything (font size, color, etc) is created correctly but TextInterlineSpacing is being ignored. I tried different values and it always comes up looking the same.

I have not found any other discussions with examples on this so I am not even sure if I am implementing it correctly.

Here is the code that we use to define the Text settings. I set the TextInterlineSpacing to half the point size as a test and it shows up the same way if it is set at the full point size.
Caption.Settings.Density = new PointD(72, 72);//
                        Caption.Settings.TextInterlineSpacing = 6;
                        Caption.Settings.FontPointsize = 12;
                        Caption.Settings.FontFamily = "Arial";
                        Caption.Settings.FillColor = new MagickColor(Color.Red);
                        Caption.Read("caption:" + content);
Coordinator
Mar 1, 2016 at 7:42 PM
Thanks for reporting this. It seems I broke some of the setting properties when I rewrote the library. I fixed those properties and added unit test for them to make sure this stays fixed. This will be fixed in the next release of Magick.NET. I don't know when I will be able to publish the new release but I will try to do it this weekend.
Mar 1, 2016 at 10:15 PM
Thanks. I will look out for that.
Mar 1, 2016 at 10:46 PM
One more question. I tried to work around it by using the setDefine method but it did not work. I
Caption.SetDefine(MagickFormat.Png32, "interline-spacing", "5");
I if there is any work around in the meantime?
Mar 2, 2016 at 12:21 AM
Sorry to keep on this but is it possible the TextGravity is also not function.
I tried the following:
Caption.Settings.TextGravity = Gravity.Center;
but the text still aligns left.
Coordinator
Mar 5, 2016 at 10:27 AM
The TextGravity issue was also reported here: https://magick.codeplex.com/discussions/651692 and has been resolved. I will try to publish a new release tomorrow.