Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

drawstring

Bad text rendering using DrawString on top of transparent pixels

September 30, 2023 by Tarik

The option I used to workaround this problem was: Graphics graphics = new Graphics(); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; There are some others useful options in TextRenderingHint Hope it helps

Categories c# Tags c++, drawstring, gdi+, system.drawing, winforms Leave a comment

How to Change Font Size in drawString Java

May 20, 2023 by Tarik

g.setFont(new Font(“TimesRoman”, Font.PLAIN, fontSize)); Where fontSize is a int. The API for drawString states that the x and y parameters are coordinates, and have nothing to do with the size of the text.

Categories java Tags awt, drawstring, fonts, graphics, java Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa