public void btnChangeScreenFont_Click(Object sender, EventArgs e) { fontDialog.Font = m_screen_font.font; if (fontDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (fontDialog.Font != null) { java.awt.Font f = new java.awt.Font(fontDialog.Font); m_screen_font = f; labelScreenFontName.Text = f.getName(); } } }
private void GenerateAuthorList() { const float shadow_shift = 2f; const string font_name = "Arial"; const int font_size = 10; Font font = new Font( font_name, java.awt.Font.PLAIN, font_size ); Dimension size = cadencii.apputil.Util.measureString( "Qjqp", font ); float width = this.Width; float height = size.height; //StringFormat sf = new StringFormat(); m_scroll = new BufferedImage( (int)width, (int)(40f + m_credit.Length * height * 1.1f), BufferedImage.TYPE_INT_BGR ); Graphics2D g = m_scroll.createGraphics(); //sf.Alignment = StringAlignment.Center; g.setFont( new Font( font_name, java.awt.Font.BOLD, (int)(font_size * 1.1f) ) ); if ( m_shadow_enablde ) { g.setColor( new Color( 0, 0, 0, 40 ) ); g.drawString( m_app_name, shadow_shift, shadow_shift ); //, width, height ), sf ); } g.setColor( Color.black ); g.drawString( m_app_name, 0f, 0f ); //, width, height ), sf ); for ( int i = 0; i < m_credit.Length; i++ ) { g.setFont( new Font( font_name, m_credit[i].getStyle(), font_size ) ); if ( m_shadow_enablde ) { g.setColor( new Color( 0, 0, 0, 40 ) ); g.drawString( m_credit[i].getName(), 0f + shadow_shift, 40f + i * height * 1.1f + shadow_shift ); //, width, height ), sf ); } g.setColor( Color.black ); g.drawString( m_credit[i].getName(), 0f, 40f + i * height * 1.1f );// , width, height ), sf ); } }
private void UpdateFonts( String font_name ) { if ( font_name == null ) { return; } if ( font_name.Equals( "" ) ) { return; } var f = this.Font; if ( f == null ) { return; } Font font = new Font( font_name, java.awt.Font.PLAIN, (int)f.SizeInPoints ); Util.applyFontRecurse( this, font ); }
public void btnChangeScreenFont_Click( Object sender, EventArgs e ) { fontDialog.Font = m_screen_font.font; if ( fontDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK ) { if ( fontDialog.Font != null ) { java.awt.Font f = new java.awt.Font(fontDialog.Font); m_screen_font = f; labelScreenFontName.Text = f.getName(); } } }
public void setBaseFont( java.awt.Font value ) { m_base_font = value; labelMenuFontName.Text = m_base_font.getName(); UpdateFonts( m_base_font.getName() ); }
public void setScreenFont( Font value ) { m_screen_font = value; labelScreenFontName.Text = m_screen_font.getName(); }
public void setFont( Font font ) { m_font = font.font; }
public void setBaseFont(java.awt.Font value) { m_base_font = value; labelMenuFontName.Text = m_base_font.getName(); UpdateFonts(m_base_font.getName()); }