Shifts and widths of 2p levels in pionic atoms